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

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 ___________
7 – For the following operations: • write the operands as 4-bit 2's complement binary numbers,...
7 – For the following operations: • write the operands as 4-bit 2's complement binary numbers, • perform the operation shown, • show all work in binary operating on 4-bit numbers, and • identify overflow if necessary. a) 4 + 2 b) 4 – 2 c) 2 – 4 d) 4 + 4
Represent -34 and +67 in the following way: a) 8 bit 1's complement representation.
Represent -34 and +67 in the following way: a) 8 bit 1's complement representation.
Complete the following table. All binary numbers are 8-bit signed integers. (Don't forget to show the...
Complete the following table. All binary numbers are 8-bit signed integers. (Don't forget to show the steps of your solution!) Decimal value Sign-magnitude representation Ones' complement representation Two's complement representation -98 10001011 01110101 10100100 Compute the results of the indicated operations in columns 2 and 3, assuming that the binary numbers represent integers in the formats given by column 1. Identify which of the operations, if any, results in an overflow. (Don't forget to show the steps of your solution!)...
Perform the following calculation in a 6-bit two’s complement system. Show your work. Indicate at the...
Perform the following calculation in a 6-bit two’s complement system. Show your work. Indicate at the end if there will be overflow/underflow or not and why. 1810 – 1010
({s^3} + 6{s^2} + 15s + 15)=0 Solve for s - please show all work
({s^3} + 6{s^2} + 15s + 15)=0 Solve for s - please show all work
1. What is the two’s complement of: 00110101 2. Carry out the following calculation using 8-bit...
1. What is the two’s complement of: 00110101 2. Carry out the following calculation using 8-bit signed arithmetic (convert to 8-bit binary sequences) and use two’s complement for the negative number, give the result as both an 8-bit binary sequence and in base 10: 127 – 74. 3. What does shifting a binary sequence to left by 3 places correspond to (from the arithmetic standpoint)
Add or subtract the following 2’s complement form signed numbers, then convert the entire problem to...
Add or subtract the following 2’s complement form signed numbers, then convert the entire problem to decimal and confirm: 110110 + 111000 001100 – 011100
Problem 5: Perform the subtraction on the following pairs of signed numbers using the 2’s complement...
Problem 5: Perform the subtraction on the following pairs of signed numbers using the 2’s complement system. Express the results as signed binary numbers and as decimal values. Please show all work to fully understand. A. 01001 - 11010 B. 10010 - 10011
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT