Question

In: Computer Science

Please show all work: Determine the 2’s complement equivalent of the following numbers in 8-bit format...

Please show all work:

Determine the 2’s complement equivalent of the following numbers in 8-bit format (N.B: You must show your work for full credit)!

  1. -12 =
  2. -9 =

Solutions

Expert Solution

1)Bit is the smallest unit in computers world.
2) 8 bit number means combinations of 0s and 1s.

For -12

For 2's complement we need two follow some rules

  • Convert the decimal number into binary number
  • apply 1s complement on binary number
  • and to the result of 1s complement add 1 (binary addition)

step 1) convert 12 in binary

12=00001100

replace left most bit with 1 two make it negative

-12 = 10001100

step 2) convert it into ones complement

for this you need to invert the given number (replace 1 by 0 and 0 by 1)

1's complement =

01110011

step 3) Add 1 to 1s complemt to convert it into 2's complement. (Binary addition are used and not normal mathematical addition because we are dealing in bits )

01110011

+1

01110100 ans

-------------------------------------------------------------------------

For -9

For 2's complement we need to follow some rules

  • Convert the decimal number into binary number
  • apply 1s complement on binary number
  • and to the result of 1s complement add 1 (binary addition)

step 1) convert 9 in binary  

9 = 00001001

replace left most bit with 1 two make it negative

-9= 10001001

step 2) convert it into ones complement

for this you need to invert the given number (replace 1 by 0 and 0 by 1)

1's complement = 01110110

step 3) Add 1 to 1s complemt to convert it into 2's complement. (Binary addition are used and not normal mathematical addition because we are dealing in bits )

2's complement =

01110110

+1

01110111


Related Solutions

What is the 8-bit sum of the following 2’s complement numbers: 11101100+00001101? Show your work.
What is the 8-bit sum of the following 2’s complement numbers: 11101100+00001101? Show your work.
add the following numbers using 16-bit 2's complement. show all the steps and calculations. Please also...
add the following numbers using 16-bit 2's complement. show all the steps and calculations. Please also show steps to verify that the answer is correct. -7493 and -6372
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent...
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent ___________ b. 1010 1001 Decimal Equivalent ___________ c. 1100 0011 Decimal Equivalent ___________ d. 0101 0101 Decimal Equivalent ___________
What decimal number is represented by the binary 2’s complement 8-bit number 11100111? Show your work
What decimal number is represented by the binary 2’s complement 8-bit number 11100111? Show your work
a)The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________. b)The decimal...
a)The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________. b)The decimal equivalent of the unsigned 8-bit hex number 0B4H is ______________. c)The value of the expression ‘H’ – ‘B’ is less than / equal to / greater than that of the expression ‘L’ – ‘C’. d)If the .data segment contains declarations                         A    BYTE      2 DUP (‘a’), ‘+’ B    BYTE      3 DUP (‘b’), 0 C    BYTE      4 DUP (‘c’), ‘–’ D    BYTE     ...
1. Please convert the following decimal numbers to 8-bit binary sign magnitude and to 8-bit 2’s...
1. Please convert the following decimal numbers to 8-bit binary sign magnitude and to 8-bit 2’s complement. Please show your work if there are multiple steps. Sign Magnitude 2’s complement a. +67 b. +40 c. -28 d. -40
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT