Question

# 4) Convert the following binary values from 4 bit numbers to 7 bit values a) 2s...

4) Convert the following binary values from 4 bit numbers to 7 bit values

a) 2s complement value: 0101

b) 2s complement value: 1010

c) Unsigned binary value: 0101

d) Unsigned binary value: 1010

e) Sign Magnititude value: 0101

f) Sign Magnititude value: 1010

(a) 0101 can be extended to 7 bits = 0000101

1’s complement of the number = 1111010

2’s complement of the number = 1111011

(b) 1010 can be extended to 7 bits = 0001010

1’s complement of the number = 1110101

2’s complement of the number = 1110110

(c) zero pad the given number 0101 = 0000101

(d) zero pad the given number 1010 = 0001010

(e) Extend the sign if sign bit is 0 (i.e. +ve) = 0000101

(f) Signed number is 1010 and hence its magnitude is found by taking its 2’s complement.

Hence magnitude is 0110, or the number is -6

We represent + 6 in 7-bit size = 0000110 and take 2’s complement to get 7-bit representation of -6

Hence the number is 1111010

#### Earn Coins

Coins can be redeemed for fabulous gifts.