Question 3 Part I, II
Question 3 Part I, II
(a)00010000
1’s Complement: 11101111
2’s Complement:
11101111 + 1 = 11110000
(b) 00000000
11111111 + 1 = 00000000
(c) 11011010
00100101 + 1 = 00100110
(d) 10101010
01010101 +1 = 01010110
(e) 10000101
01111010 + 1 = 01111011
ii. Determine the decimal value of each signed binary number:
(a)10011001
1. Sign-Magnitude:
It’s MSB = 1 → means negative
The binary number 0011001 converts to decimal as follows:
=(0×26)+(0×25)+(1×24)+(1×23)+(0×22)+(0×21)+(1×20)
= (0)+(0)+(16)+(8)+(0)+(0)+(1)
= 25
Final Answer: -25
2. One’s Complement:
(0×27)+(1×26)+(1×25)+(0×24)+(0×23)+(1×22)+(1×21)+(0×20)
=0+64+32+0+0+4+2+0 = 102
3. 2’s complement:
=10011001
=01100110 + 1 = 01100111
Into decimal:
=0×27 + 1×26 + 1×25 + 0×24 + 0×23 + 1×22 + 1×21 + 1×20
=0+64+32+0+0+4+2+1
= 103
The number is negative, so
= -103
(b) 01110100
(c) 10111111
1. Sign-Magnitude:
It’s MSB = 1 → means negative
Magnitude: 0111111 = 63
Answer: -63
2. One’s Complement:
MSB 1 → Negative
Invert bits: 01000000
Decimal: 64
Answer: -64
3. 2’s complement:
= 10111111
= 01000000 + 1 = 01000001
Now convert into decimal
= 01000001
= 0 × 2⁷ + 1 × 2⁶ + 0 × 2⁵ + 0 × 2⁴ + 0 × 2³ + 0 × 2² + 0 × 2¹ + 1 × 2⁰
= 0 × 64 + 1 × 64 + 0 + 0 + 0 + 0 + 0 + 1
= 65