Given the following eight bit twos complement binary numbers

Given the following eight bit two\'s complement binary numbers, complement them; that is, express the value in eight bit two\'s complement with the same absolute value but opposite sign. Show your work at each step. 1111 0000 1101 1010 0111 0101 1011 1011

Solution

a) 1111 0000 = -128 + 64 + 32+16 +0 + 0+0+0 = -16

So we need to get binary of number of 16

Step 1: The number starts with 1, so it\'s negative, so we find the complement of 1111 0000, which is 0000 1111.

Step 2: Add 1 to this complement

0000 1111 + 1 = 0001 0000

Step 3: Decimal value of 0001 0000 = 16

Hence, complement is 0001 0000

b) 1101 1010 (-38)

Step 1: Complement the number: 0010 0101

Step 2: Add 1 to binary number

0010 0101 + 1 = 0010 0110 (38)

c) 0111 0101 (117)

Step 1: Complement of number: 1000 1010

Step 2: Add 1 to the binary number

1000 1010 + 1 = 1000 1011 (-117)

d)1011 1011 (-69)

Step 1: Complement of number: 0100 0100

Step 2: Add 1 to binary number

0100 0100 + 1 = 0100 0101 (69)

 Given the following eight bit two\'s complement binary numbers, complement them; that is, express the value in eight bit two\'s complement with the same absolu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site