Page 1
- 2.1 -
Chapter 2Problem Solutions
2.1.
Decimal Binary Ternary Octal Hexadecimal
32 100000 1012 40 20
33 100001 1020 41 21
34 100010 1021 42 22
35 100011 1022 43 23
36 100100 1100 44 24
37 100101 1101 45 25
38 100110 1102 46 26
39 100111 1110 47 27
40 101000 1111 50 28
41 101001 1112 51 29
42 101010 1120 52 2A
43 101011 1121 53 2B
44 101100 1122 54 2C
45 101101 1200 55 2D
46 101110 1201 56 2E
47 101111 1202 57 2F
48 110000 1210 60 30
49 110001 1211 61 31
50 110010 1212 62 32
Page 2
- 2.2 -
2.2.Decimal Quaternary Quinary Duodecimal
0 0 0 0
1 1 1 1
2 2 2 2
3 3 3 3
4 10 4 4
5 11 10 5
6 12 11 6
7 13 12 7
8 20 13 8
9 21 14 9
10 22 20 A
11 23 21 B
12 30 22 10
13 31 23 11
14 32 24 12
15 33 30 13
16 100 31 14
17 101 32 15
18 102 33 16
19 103 34 17
20 110 40 18
21 111 41 19
22 112 42 1A
23 113 43 1B
24 120 44 20
25 121 100 21
26 122 101 22
27 123 102 23
28 130 103 24
29 131 104 25
30 132 110 26
31 133 111 27
Page 3
- 2.3 -
2.3. (a) 1 1 (b) 1111 (c) 11 11 1 1101 1001 1100.01
+ 1001_____ + 111_____ + 101.11________ 10110 10000 10010.00
(d) 111 11 (e) 111 (f) 1 11 11.011 111.01 0.1110+ 10.111_______ + 11.10_______ +0.1011______ 110.010 1010.11 1.1001
2.4. (a) 00 (b) 001 (c) 0110 1 1/1/01 1/1/0/01.1 1/0/0/1/.0/0- 110____ - 1011.0_______ - 11.01_______ 111 1110.1 101.11
(d) 0 0 (e) 01 0 (f) 0 1 1/01/.01 1/0/0.11/01 1011/.0/0- 10.10______ - 11.1010________ - 10.11_______
10.11 1.0011 1000.01
2.5. (a) 10111 (b) 11011 × 110_____ × 1011_____ 00000 11011 10111 11011 10111 ________ 0000010001010 11011 _________
100101001
(c) 1010 (d) 101.1 ×1.01____ ×11.01_____ 10 10 1 011 000 0 00 001010 _______ 101 11100.10 1011 _________
10001.111
2.6. (a) 10.1________ (b) 110011____________1010)11001.0 10101)10000101111 -1010____ - 10101______ 101 0 11000 -101 0_____ -10101_____ 0 11111
-10101_____ 10101 -10101_____ 0
Page 4
- 2.4 -
2.6. (continued)
(c) 110.101___________ (d) 101 1.01____________110)100111.110 101.1 )111101.1 11 - 110____ -1011____ 111 10001 -110___ - 1011_____ 11 1 110 1 -11 0____ -101 1_____ 110 1 0 11 -110___ -1 0 11______ 0 0
2.7. (a) 1 1 (b) 11 1 (c) 120 2012.0 220.12 2/0/1/02+ 1102.1_______ + 121.20_______ -12121_____ 10121.1 1112.02 211
(d) 012 1 (e) 120.21 (f) 12202 1/2/0/02/.12 × 122______ × 21.2_____- 2121.20________ 1011 12 10211 1 2110.22 10111 2 12202
12021 _________ 102111 _________100221.02 1122000.1
(g) 210.2_________ (h) 1 2.02___________1012)221200.1 212.1 )11111.2 12
-2101____ - 2121_____ 1110 1220 2 -1012____ -1201 2______ 210 1 12 0 12 -210 1_____ -12 0 12_______ 0 0
2.8. (a) Quaternary
a+b b
0 1 2 3
a
0 0 1 2 3
1 1 2 3 1:0
2 2 3 1:0 1:1
3 3 1:0 1:1 1:2
Notation: x:y denotes carry digit x and sum digit y.
Page 5
- 2.5 -
2.8. (continued)
a-b b
0 1 2 3
a
0 0 1:3 1:2 1:1
1 1 0 1:3 1:2
2 2 1 0 1:3
3 3 2 1 0
Notation: x:y denotes borrow digit x and difference digit y.
a×b b
0 1 2 3
a
0 0 0 0 0
1 0 1 2 3
2 0 2 1:0 1:2
3 0 3 1:2 2:1
Notation: x:y denotes carry digit x and product digit y.
(b) Octal
a+b b
0 1 2 3 4 5 6 7
a
0 0 1 2 3 4 5 6 7
1 1 2 3 4 5 6 7 1:0
2 2 3 4 5 6 7 1:0 1:1
3 3 4 5 6 7 1:0 1:1 1:2
4 4 5 6 7 1:0 1:1 1:2 1:3
5 5 6 7 1:0 1:1 1:2 1:3 1:4
6 6 7 1:0 1:1 1:2 1:3 1:4 1:5
7 7 1:0 1:1 1:2 1:3 1:4 1:5 1:6
Notation: x:y denotes carry digit x and sum digit y.
Page 6
- 2.6 -
2.8. (continued)
a-b b
0 1 2 3 4 5 6 7
a
0 0 1:7 1:6 1:5 1:4 1:3 1:2 1:1
1 1 0 1:7 1:6 1:5 1:4 1:3 1:2
2 2 1 0 1:7 1:6 1:5 1:4 1:3
3 3 2 1 0 1:7 1:6 1:5 1:4
4 4 3 2 1 0 1:7 1:6 1:5
5 5 4 3 2 1 0 1:7 1:6
6 6 5 4 3 2 1 0 1:7
7 7 6 5 4 3 2 1 0
Notation: x:y denotes borrow digit x and difference digit y.
a×b b
0 1 2 3 4 5 6 7
a
0 0 0 0 0 0 0 0 0
1 0 1 2 3 4 5 6 7
2 0 2 4 6 1:0 1:2 1:4 1:6
3 0 3 6 1:1 1:4 1:7 2:2 2:5
4 0 4 1:0 1:4 2:0 2:4 3:0 3:4
5 0 5 1:2 1:7 2:4 3:1 3:6 4:3
6 0 6 1:4 2:2 3:0 3:6 4:4 5:2
7 0 7 1:6 2:5 3:4 4:3 5:2 6:1
Notation: x:y denotes carry digit x and product digit y.
Page 7
- 2.7 -
2.8. (continued)
(c) Hexadecimal
a+b b
0 1 2 3 4 5 6 7 8 9 A B C D E F
a
0 0 1 2 3 4 5 6 7 8 9 A B C D E F
1 1 2 3 4 5 6 7 8 9 A B C D E F 1:0
2 2 3 4 5 6 7 8 9 A B C D E F 1:0 1:1
3 3 4 5 6 7 8 9 A B C D E F 1:0 1:1 1:2
4 4 5 6 7 8 9 A B C D E F 1:0 1:1 1:2 1:3
5 5 6 7 8 9 A B C D E F 1:0 1:1 1:2 1:3 1:4
6 6 7 8 9 A B C D E F 1:0 1:1 1:2 1:3 1:4 1:5
7 7 8 9 A B C D E F 1:0 1:1 1:2 1:3 1:4 1:5 1:6
8 8 9 A B C D E F 1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7
9 9 A B C D E F 1:0 1:1 1:2 1:3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E 1:C 2:A 3:8 4:6 5:4 6:2 7:0 7:E 8:C 9:A A:8 B:6 C:4 D:2
F 0 F 1:E 2:D 3:C 4:B 5:A 6:9 7:8 8:7 9:6 A:5 B:4 C:3 D:2 E:1
Notation: x:y denotes carry digit x and product digit y.
2.9. (a) 11 1 (b) 0233 (c) 1111 1 31213(4) 1/3/0/0/12(4) 466735(8)+ 23102(4)_________ - 33321(4)_________ + 375627(8)__________ 120321(4) 30031(4) 1064564(8)
(d) 6775 (e) 1 1 (f) C5 AF4 7/0/0/6/05(8) 8C9F65(16) D/6/2B/0/5/3(16)-356742(8)_________ +374B27(16)__________ -47E3C89(16)___________ 321643(8) C3EA8C(16) 8E473CA(16)
Page 10
- 2.10 -
2.10. (a) 101101.1(2) = 1×105 + 0×104 + 1×103 + 1×102 + 0×101
+ 1×100 + 1×10-1
/ 1×25 + 0×24 + 1×23 + 1×22 + 0×21
+ 1×20 + 1×2-1
= 32 + 0 + 8 + 4 + 0 + 1 + 0.5
= 45.5(10)
(b) 110111.101(2) = 1×105 + 1×104 + 0×103 + 1×102 + 1×101
+ 1×100 + 1×10-1 + 0×10-2 + 1×10-3
/ 1×25 + 1×24 + 0×23 + 1×22 + 1×21
+ 1×20 + 1×2-1 + 0×2-2 + 1×2-3
= 32 + 16 + 0 + 4 + 2 + 1 + 0.5 + 0
+ 0.125
= 55.625(10)
(c) 2110(3) = 2×103 + 1×102 + 1×101 + 0×100
/ 2×33 + 1×32 + 1×31 +1×30
= 54 + 9 + 3 + 0
= 66(10)
(d) 12021.1(3) = 1×104 + 2×103 + 0×102 + 2×101 + 1×100
+ 1×10-1
/ 1×34 + 2×33 + 0×32 + 2×31 + 1×30 + 1×3-1
= 81 + 54 + 0 + 6 + 1 + 0.333...
= 142.333...(10)
(e) 362(8) = 3×102 + 6×101 + 2×100
/ 3×82 + 6×81 + 2×80
= 192 + 48 + 2
= 242(10)
(f) 1475.2(8) = 1×103 + 4×102 + 7×101 + 5×100 + 2×10-1
/ 1×83 + 4×82 + 7×81 + 5×80 + 2×8-1
= 512 + 256 + 56 + 5 + 0.25
= 829.25(10)
Page 11
- 2.11 -
2.10. (continued)
(g) 2C3(16) = 2×102 + C×101 + 3×100
/ 2×162 + 12×161 + 3×160
= 512 + 192 + 3
= 707(10)
(h) AD.E(16) = A×101 + D×100 + E×10-1
/ 10×161 + 13×160 + 14×16-1
= 160 + 13 + 0.875
= 173.875(10)
2.11. (a) 42(10) = 4×101 + 2×100
/ 100×10101 + 10×10100
= 101000 + 10
= 101010(2)
(b) 78.5(10) = 7×101 + 8×100 + 5×10-1
/ 111×10101 + 1000×10100 + 101×1010-1
= 1000110 + 1000 + 0.1
= 1001110.1(2)
(c) 201(3) = 2×102 + 0×101 + 1×100
/ 10×112 + 0×111 + 1×110
= 10010 + 0 + 1
= 10011(2)
(d) 21.2(3) = 2×101 + 1×100 + 2×10-1
/ 10×111 + 1×110 + 10×11-1
= 110 + 1 + 0.101010...
= 111.101010...(2)
(e) 204(8) = 2×102 + 0×101 + 4×100
/ 10×10002 + 0×10001 + 100×10000
= 10000000 + 0 + 100
= 10000100(2)
Page 12
- 2.12 -
2.11. (continued)
(f) 56.3(8) = 5×101 + 6×100 + 3×10-1
/ 101×10001 + 110×10000 + 11×1000-1
= 101000 + 110 + 0.011
= 101110.011(2)
2.12. (a) 11010(2) = 1×104 + 1×103 + 0×102 + 1×101 + 0×100
/ 1×24 + 1×23 + 0×22 + 1×21 + 0×20
= 1×121 + 1×22 + 0×11 + 1×2 + 0×1
= 121 + 22 + 0 + 2 + 0
= 222(3)
(b) 73.2(8) = 7×101 + 3×100 + 2×10-1
/ 21×221 + 10×220 + 2×22-1
= 2002 + 10 + 0.020202...
= 2012.020202...(3)
(c) 75(10) = 7×101 + 5×100
/ 21×1011 + 12×1010
= 2121 + 12
= 2210(3)
(d) 3D(16) = 3×101 + D×100
/ 10×1211 + 111×1210
= 1210 + 111
= 2021(3)
Page 13
- 2.13 -
2.13. Using the polynomial method of converting 225(b) to
decimal:
225(b) = 2×102 + 2×101 + 5×100
/ (2×b2 + 2×b1 + 5×b0)(10) = 89(10)
Solving the quadradic 2b2+2b-84=0 for b:
b = +6 or -7
Since the base of a number system is defined as the number
of symbols in the system, the base must be positive.
ˆ b = 6
2.14. (a) Remainders Integers
163÷2=81 1(10)/1(2) 0.75×2=1.50 1(10)/1(2)
81÷2=40 1(10)/1(2) 0.50×2=1.00 1(10)/1(2) 40÷2=20 0(10)/0(2) 20÷2=10 0(10)/0(2) 10÷2= 5 0(10)/0(2) 5÷2= 2 1(10)/1(2) 2÷2= 1 0(10)/0(2) 1÷2= 0 1(10)/1(2)
ˆ 163.75(10) / 10100011.11(2)
Remainders Integers
202÷2=101 0(10)/0(2) 0.9×2=1.8 1(10)/1(2)101÷2= 50 1(10)/1(2) 0.8×2=1.6 1(10)/1(2) 50÷2= 25 0(10)/0(2) 0.6×2=1.2 1(10)/1(2) 25÷2= 12 1(10)/1(2) 0.2×2=0.4 0(10)/0(2) 12÷2= 6 0(10)/0(2) 0.4×2=0.8 0(10)/0(2) 6÷2= 3 0(10)/0(2) 3÷2= 1 1(10)/1(2) 1÷2= 0 1(10)/1(2)
ˆ 202.9(10) / 11001010.111001100...
(2)
Page 14
- 2.14 -
2.14. (continued)
(b) Remainders Integers
163÷3=54 1(10)/1(3) 0.75×3=2.25 2(10)/2(3)
54÷3=18 0(10)/0(3) 0.25×3=0.75 0(10)/0(3) 18÷3= 6 0(10)/0(3) 6÷3= 2 0(10)/0(3) 2÷3= 0 2(10)/2(3)
ˆ 163.75(10) / 20001.2020...
(3)
Remainders Integers
202÷3=67 1(10)/1(3) 0.9×3=2.7 2(10)/2(3) 67÷3=22 1(10)/1(3) 0.7×3=2.1 2(10)/2(3) 22÷3= 7 1(10)/1(3) 0.1×3=0.3 0(10)/0(3) 7÷3= 2 1(10)/1(3) 0.3×3=0.9 0(10)/0(3) 2÷3= 0 2(10)/2(3)
ˆ 202.9(10) / 21111.22002200...
(3)
(c) Remainders Integers
163÷8=20 3(10)/3(8) 0.75×8=6.00 6(10)/6(8)
20÷8= 2 4(10)/4(8) 2÷8= 0 2(10)/2(8)
ˆ 163.75(10) / 243.6(8)
Remainders Integers
202÷8=25 2(10)/2(8) 0.9×8=7.2 7(10)/7(8) 25÷8= 3 1(10)/1(8) 0.2×8=1.6 1(10)/1(8) 3÷8= 0 3(10)/3(8) 0.6×8=4.8 4(10)/4(8)
0.8×8=6.4 6(10)/6(8) 0.4×8=3.2 3(10)/3(8)
ˆ 202.9(10) / 312.714631463...
(3)
(d) Remainders Integers
163÷16=10 3(10)/3(16) 0.75×16=12.00 12(10)/C(16)
10÷16= 0 10(10)/A(16)ˆ 163.75(10) / A3.C(16)
Page 15
- 2.15 -
2.14. (continued)
Remainders Integers
202÷16=12 10(10)/A(16) 0.9×16=14.4 14(10)/E(16)
12÷16= 0 12(10)/C(16) 0.4×16= 6.4 6(10)/6(16)ˆ 202.9(10) / CA.E66
...(16)
2.15. (a) Remainders
11100010÷11=1001011 1(2)/1(3) 1001011÷11= 11001 0(2)/0(3) 11001÷11= 1000 1(2)/1(3) 1000÷11= 10 10(2)/2(3) 10÷11= 0 10(2)/2(3)
Integers
0.1101×11=10.0111 10(2)/2(3)0.0111×11= 1.0101 1(2)/1(3)0.0101×11= 0.1111 0(2)/0(3)0.1111×11=10.1101 10(2)/2(3)
ˆ 11100010.1101(2) / 22101.21022102...
(3)
(b) Remainders
11100010÷1000=11100 10(2)/2(8) 11100÷1000= 11 100(2)/4(8) 11÷1000= 0 11(2)/3(8)
Integers
0.1101×1000=110.1000 110(2)/6(8)0.1000×1000=100.0000 100(2)/4(8)
ˆ 11100010.1101(2) / 342.64(8)
(c) Remainders
11100010÷1010=10110 110(2)/6(10) 10110÷1010= 10 10(2)/2(10) 10÷1010= 0 10(2)/2(10)
Page 16
- 2.16 -
2.15. (continued)
Integers
0.1101×1010=1000.0010 1000(2)/8(10)0.0010×1010= 1.0100 1(2)/1(10)0.0100×1010= 10.1000 10(2)/2(10)0.1000×1010= 101.0000 101(2)/5(10)
ˆ 11100010.1101(2) / 226.8125(10)
(d) Remainders
11100010÷10000=1110 10(2)/2(16) 1110÷10000= 0 1110(2)/E(16)
Integers
0.1101×10000=1101.0000 1101(2)/D(16)ˆ 11100010.1101(2) / E2.D(16)
2.16. (a) Remainders Integers
10112÷2=1202 1(3)/1(2) 0.1×2=0.2 0(3)/0(2)
1202÷2= 212 1(3)/1(2) 0.2×2=1.1 1(3)/1(2) 212÷2= 102 1(3)/1(2) 102÷2= 12 1(3)/1(2) 12÷2= 2 1(3)/1(2) 2÷2= 1 0(3)/0(2) 1÷2= 0 1(3)/1(2)
ˆ 10112.1(3) / 1011111.0101...
(2)
(b) Remainders Integers
10112÷22=102 21(3)/7(8) 0.1×22= 2.2 2(3)/2(8)
102÷22= 1 10(3)/3(8) 0.2×22=12.1 12(3)/5(8) 1÷22= 0 1(3)/1(8)
ˆ 10112.1(3) / 137.2525...
(2)
(c) Remainders Integers
10112÷101=100 12(3)/5(10) 0.1×101=10.1 10(3)/3(10) 100÷101= 0 100(3)/9(10)
ˆ 10112.1(3) / 95.33...
(10)
Page 17
- 2.17 -
2.16. (continued)
(d) Remainders Integers
10112÷121=12 120(3)/F(16) 0.1×121=12.1 12(3)/5(16) 12÷121= 0 12(3)/5(16)
ˆ 10112.1(3) / 5F.55...
(16)
2.17. (a) 7 7 1 . 1 7 2(8) 8 8 8 8 8 8 000111111001.001111010(2)
9 9 9 9 9 1 F 9 . 3 D(16)
(b) 1 2 1 3 . 4(8) 8 8 8 8 8
001010001011.1000(2)
9 9 9 9 2 8 B . 8(16)
(c) 2 7 4 2 . 2 2 6(8) 8 8 8 8 8 8 8
010111100010.010010110(2)
9 9 9 9 9 5 E 2 . 4 B(16)
(d) 3 4 4 6 . 5(8) 8 8 8 8 8
011100100110.1010(2)
9 9 9 9 7 2 6 . A(16)
2.18. (a) 3 7 . 5(8) 9 9 9
011111.101(2)
Page 18
- 2.18 -
2.18. (continued)
(b) 4 5 . 1(8) 9 9 9
100101.001(2)
(c) 6 1 . 3(8) 9 9 9
110001.011(2)
(d) 7 2 4 . 0 6(8) 9 9 9 9 9
111010100.000110(2)
2.19. (a) 1 C . 3(16) 9 9 9
00011100.0011(2)
(b) F 2 . C(16) 9 9 9
11110010.1100(2)
(c) 4 5 0 . B(16) 9 9 9 9
010001010000.1011(2)
(d) 8 E A . 5 9(16) 9 9 9 9 9
100011101010.01011001(2)
Page 19
- 2.19 -
2.20. Algorithm to convert between base-3 and base-9:
1. Form blocks of 2 digits of the base-3 number starting
at the radix point and working both right and left,
adding leading and trailing 0's if necessary.
2. Replace each block of 2 digits by its equivalent digit
in base-9.
The conversion for 21021.112(3) is
021021.1120(3) 9 9 9 9 9 2 3 7 . 4 6(9)
2.21. (a) Let N= be the r's-complement of N. Therefore,
N= = rn - N
The r's-complement of N= is
rn - N= = rn - (rn - N) = (rn - rn) + N = N
(b) Let N- be the (r-1)'s-complement of N. Therefore,
N- = rn - r-m - N
The (r-1)'s-complement of N- is
rn - r-m - N- = rn - r-m - (rn - r-m - N)
= (rn - rn) + (r-m - r-m) + N
= N
2.22. 1's-complements:
(a) 108 - 10-0 - 10111011 = 01000100
(b) 109 - 10-0 - 101110100 = 010001011
(c) 106 - 10-0 - 101100 = 010011
(d) 107 - 10-0 - 0110101 = 1001010
(e) 103 - 10-2 - 010.11 = 101.00
(f) 105 - 10-3 - 11011.100 = 00100.011
(g) 106 - 10-3 - 100101.101 = 011010.010
Page 20
- 2.20 -
2.22. (continued)
(h) 107 - 10-3 - 1010110.110 = 0101001.001
2's-complements:
(a) 108 - 10111011 = 01000101
(b) 109 - 101110100 = 010001100
(c) 106 - 101100 = 010100
(d) 107 - 0110101 = 1001011
(e) 103 - 010.11 = 101.01
(f) 105 - 11011.100 = 00100.100
(g) 106 - 100101.101 = 011010.011
(h) 107 - 1010110.110 = 0101001.010
2.23. 9's-complements:
(a) 106 - 10-0 - 285302 = 714697
(b) 105 - 10-0 - 39040 = 60959
(c) 106 - 10-0 - 059637 = 940362
(d) 106 - 10-0 - 610500 = 389499
(e) 104 - 10-2 - 7142.89 = 2857.10
(f) 104 - 10-4 - 5263.4580 = 4736.5419
(g) 104 - 10-3 - 0283.609 = 9716.390
(h) 103 - 10-4 - 134.5620 = 865.4379
10's-complements:
(a) 106 - 285302 = 714698
(b) 105 - 39040 = 60960
(c) 106 - 059637 = 940363
(d) 106 - 610500 = 389500
Page 21
- 2.21 -
2.23. (continued)
(e) 104 - 7142.89 = 2857.11
(f) 104 - 5263.4580 = 4736.5420
(g) 104 - 0283.609 = 9716.391
(h) 103 - 134.5620 = 865.4380
2.24. r's-complements:
(a) 104 - 0120.21(3) = 2102.02(3)
(b) 103 - 101.120(3) = 121.110(3)
(c) 103 - 241.03(5) = 203.42(5)
(d) 103 - 031.240(5) = 413.210(5)
(e) 103 - 407.270(8) = 370.510(8)
(f) 104 - 0156.0037(8) = 7621.7741(8)
(g) 103 - 83D.9F(16) = 7C2.61(16)
(h) 105 - 0070C.B6E(16) = FF8F3.492(16)
(r-1)'s-complements:
(a) 104 - 10-2 - 0120.21(3) = 2102.01(3)
(b) 103 - 10-3 - 101.120(3) = 121.102(3)
(c) 103 - 10-2 - 241.03(5) = 203.41(5)
(d) 103 - 10-3 - 031.240(5) = 413.204(5)
(e) 103 - 10-3 - 407.270(8) = 370.507(8)
(f) 104 - 10-4 - 0156.0037(8) = 7621.7740(8)
(g) 103 - 10-2 - 83D.9F(16) = 7C2.60(16)
(h) 105 - 10-3 - 0070C.B6E(16) = FF8F3.491(16)
Page 22
- 2.22 -
2.25. Using 1's-complements:
(a) N1 = 1101101 6 N1 = 1101101
N2 = 0110110 6 + N-2 = + 1001001_________
1 0110110 + 1 _______ 0110111
(b) N1 = 010100 6 N1 = 010100
N2 = 110000 6 + N-2 = + 001111______
100011
(c) N1 = 10010.00111 6 N1 = 10010.00111
N2 = 00101.11000 6 + N-2 = + 11010.00111_____________
1 01100.01110 + 1___________ 01100.01111
(d) N1 = 10110.0100 6 N1 = 10110.0100
N2 = 01011.1101 6 + N-2 = + 10100.0010____________
1 01010.0110 + 1__________ 01010.0111
(e) N1 = 01101.1011 6 N1 = 01101.1011
N2 = 10110.1100 6 + N-2 = + 01001.0011__________
10110.1110
(f) N1 = 00101.100100 6 N1 = 00101.100100
N2 = 11010.010011 6 + N-2 = + 00101.101100____________
01011.010000
Using 2's-complements:
(a) N1 = 1101101 6 N1 = 1101101
N2 = 0110110 6 + N=2 = + 1001010_________
1/ 0110111
(b) N1 = 010100 6 N1 = 010100
N2 = 110000 6 + N=2 = + 010000______
100100
Page 23
- 2.23 -
2.25. (continued)
(c) N1 = 10010.00111 6 N1 = 10010.00111
N2 = 00101.11000 6 + N=2 = + 11010.01000_____________
1/ 01100.01111
(d) N1 = 10110.0100 6 N1 = 10110.0100
N2 = 01011.1101 6 + N=2 = + 10100.0011____________
1/ 01010.0111
(e) N1 = 01101.1011 6 N1 = 01101.1011
N2 = 10110.1100 6 + N=2 = + 01001.0100__________
10110.1111
(f) N1 = 00101.100100 6 N1 = 00101.100100
N2 = 11010.010011 6 + N=2 = + 00101.101101____________
01011.010001
2.26. Using 1's-complements:
(a) N1 = 0s10110 6 N1 = 0s10110
N2 = 0s01101 6 + N-2 = + 1s10010_________
1 0s01000 + 1 _______ 0s01001
(b) N1 = 0s010111 6 N1 = 0s010111
N2 = 0s110100 6 + N-2 = + 1s001011________
1s100010
(c) N1 = 0s110.1001 6 N1 = 0s110.1001
N2 = 0s011.0100 6 + N-2 = + 1s100.1011____________
1 0s011.0100 + 1__________ 0s011.0101
(d) N1 = 0s10101.1 6 N1 = 0s10101.1
N2 = 0s10101.1 6 + N-2 = + 1s01010.0_________
1s11111.1
Page 24
- 2.24 -
2.26. (continued)
(e) N1 = 0s101.11000 6 N1 = 0s101.11000
N2 = 0s010.01011 6 + N-2 = + 1s101.10100_____________
1 0s011.01100 + 1___________ 0s011.01101
(f) N1 = 0s010111.10101 6 N1 = 0s010111.10101
N2 = 0s111010.11000 6 + N-2 = + 1s000101.00111______________
1s011100.11100
Using 2's-complements:
(a) N1 = 0s10110 6 N1 = 0s10110
N2 = 0s01101 6 + N=2 = + 1s10011_________
1/ 0s01001
(b) N1 = 0s010111 6 N1 = 0s010111
N2 = 0s110100 6 + N=2 = + 1s001100________
1s100011
(c) N1 = 0s110.1001 6 N1 = 0s110.1001
N2 = 0s011.0100 6 + N=2 = + 1s100.1100____________
1/ 0s011.0101
(d) N1 = 0s10101.1 6 N1 = 0s10101.1
N2 = 0s10101.1 6 + N=2 = + 1s01010.1___________
1/ 0s00000.0
(e) N1 = 0s101.11000 6 N1 = 0s101.11000
N2 = 0s010.01011 6 + N=2 = + 1s101.10101_____________
1/ 0s011.01101
(f) N1 = 0s010111.10101 6 N1 = 0s010111.10101
N2 = 0s111010.11000 6 + N=2 = + 1s000101.01000______________
1s011100.11101
Page 25
- 2.25 -
2.27. Using 9's-complements:
(a) N1 = 7842 6 N1 = 7842
N2 = 3791 6 + N-2 = + 6208______
1 4050 + 1 ____ 4051
(b) N1 = 265 6 N1 = 265
N2 = 894 6 + N-2 = + 105___
370
(c) N1 = 508.3 6 N1 = 508.3
N2 = 094.7 6 + N-2 = + 905.2_______
1 413.5 + 1_____ 413.6
(d) N1 = 073.68 6 N1 = 0.73.68
N2 = 538.90 6 + N-2 = + 461.09______
534.77
(e) N1 = 427.08 6 N1 = 427.08
N2 = 089.30 6 + N-2 = + 910.69________
1 337.77 + 1______ 337.78
(f) N1 = 0804.20 6 N1 = 0804.20
N2 = 3621.47 6 + N-2 = + 6378.52_______
7182.72
Using 10's-complements:
(a) N1 = 7842 6 N1 = 7842
N2 = 3791 6 + N=2 = + 6209______
1/ 4051
(b) N1 = 265 6 N1 = 265
N2 = 894 6 + N=2 = + 106___
371
Page 26
- 2.26 -
2.27. (continued)
(c) N1 = 508.3 6 N1 = 508.3
N2 = 094.7 6 + N=2 = + 905.3_______
1/ 413.6
(d) N1 = 073.68 6 N1 = 073.68
N2 = 538.90 6 + N=2 = + 461.10______
534.78
(e) N1 = 427.08 6 N1 = 427.08
N2 = 089.30 6 + N=2 = + 910.70________
1/ 337.78
(f) N1 = 0804.20 6 N1 = 0804.20
N2 = 3621.47 6 + N=2 = + 6378.53_______
7182.73
2.28. Using 9's-complements:
(a) N1 = 0s546 6 N1 = 0s546
N2 = 0s232 6 + N-2 = + 1s767_______
1 0s313 + 1 _____ 0s314
(b) N1 = 0s384 6 N1 = 0s384
N2 = 0s726 6 + N-2 = + 1s273_____
1s657
(c) N1 = 0s326.4 6 N1 = 0s326.4
N2 = 0s087.2 6 + N-2 = + 1s912.7_________
1 0s239.1 + 1_______ 0s239.2
(d) N1 = 0s076.23 6 N1 = 0s076.23
N2 = 0s209.40 6 + N-2 = + 1s790.59________
1s866.82
Page 27
- 2.27 -
2.28. (continued)
(e) N1 = 0s406.9 6 N1 = 0s406.9
N2 = 0s406.9 6 + N-2 = + 1s593.0_______
1s999.9
(f) N1 = 0s063.40 6 N1 = 0s063.40
N2 = 0s240.36 6 + N-2 = + 1s759.63________
1s823.03
Using 10's-complements:
(a) N1 = 0s546 6 N1 = 0s546
N2 = 0s232 6 + N=2 = + 1s768_______
1/ 0s314
(b) N1 = 0s384 6 N1 = 0s384
N2 = 0s726 6 + N=2 = + 1s274_____
1s658
(c) N1 = 0s326.4 6 N1 = 0s326.4
N2 = 0s087.2 6 + N=2 = + 1s912.8_________
1/ 0s239.2
(d) N1 = 0s076.23 6 N1 = 0s076.23
N2 = 0s209.40 6 + N=2 = + 1s790.60________
1s866.83
(e) N1 = 0s406.9 6 N1 = 0s406.9
N2 = 0s406.9 6 + N=2 = + 1s593.1_________
1/ 0s000.0
(f) N1 = 0s063.40 6 N1 = 0s063.40
N2 = 0s240.36 6 + N=2 = + 1s759.64________
1s823.04
Page 28
- 2.28 -
2.29. A=0s1000110 A==1s0111010
B=1s1010011 B==0s0101101
(a) A+B (b) A-B = A+B=
A = 0s1000110 A = 0s1000110
+ B = + 1s1010011___________ + B= = + 0s0101101_________
1/ 0s0011001 0s1110011
(c) B-A = B+A=
(d) -A-B = A=+B=
B = 1s1010011 A= = 1s0111010
+ A= = + 1s0111010___________ + B
= = + 0s0101101_________
1/ 1s0001101 1s1100111
2.30. A=0s601.7 A==1s398.3
B=1s754.2 B==0s245.8
(a) A+B (b) A-B = A+B=
A = 0s601.7 A = 0s601.7
+ B = + 1s754.2_________ + B= = + 0s245.8_______
1/ 0s355.9 0s847.5
(c) B-A = B+A=
(d) -A-B = A=+B=
B = 1s754.2 A= = 1s398.3
+ A= = + 1s398.3_________ + B
= = + 0s245.8_______
1/ 1s152.5 1s644.1
2.31. A=0s1010110 A-=1s0101001
B=1s1101100 B-=0s0010011
(a) A+B (b) A-B = A+B-
A = 0s1010110 A = 0s1010110
+ B = + 1s1101100___________ + B- = + 0s0010011_________
1 0s1000010 0s1101001 + 1_________
0s1000011
Page 29
- 2.29 -
2.31. (continued)
(c) B-A = B+A- (d) -A-B = A-+B-
B = 1s1101100 A- = 1s0101001
+ A- = + 1s0101001___________ + B- = + 0s0010011_________ 1 1s0010101 1s0111100 + 1_________ 1s0010110
2.32. A=0s418.5 A-=1s581.4
B=1s693.0 B-=0s306.9
(a) A+B (b) A-B = A+B-
A = 0s418.5 A = 0s418.5
+ B = + 1s693.0_________ + B= = + 0s306.9_______
1 0s111.5 0s725.4 + 1_______
0s111.6
(c) B-A = B+A- (d) -A-B = A-+B-
B = 1s693.0 A- = 1s581.4
+ A- = + 1s581.4_________ + B- = + 0s306.9_______ 1 1s274.4 1s888.3 + 1_______ 0s274.5
2.33. (a) 100001010011 (b) 011001000010 (c) 101110000110
8 5 3 8 5 3 8 5 3
(d) 100100010000010101000 (e) 100100101000110
8 5 3 8 5 3
2.34. (a) 8 9 5 8 3
(b) 5 6 2 5 0
10001001010110000011
(c) 7 2 6 1
Page 30
- 2.30 -
2.35.
(a) (b) (c) (d)
Decimal
Digit7635- 8324- 834-2- 864-1-
0 0000 0000 0000 0000
1 0101 0111 0101 0111
2 1001 0010 1011 0110
3 0010 0100 0100 1011
4 0111 1001 1010 1010
5 1011 0110 1111 0101
6 0100 1011 1001 0100
7 1000 1101 1110 1001
8 1101 1000 1000 1000
9 0110 1111 1101 1111
The 8324- and 864-1- codes are self-complementing.
2.36. In order to represent the decimal integer 1 in a code
having all positive weights, one of the weights must be a
1; while to represent the decimal integer 2, the weight of
2 is needed or another weight of 1 so that 2 can be
represented by 1+1. Since there are no negative weights,
the decimal integer 9 can only be represented if the sum of
the weights is at least equal to 9.
Page 31
- 2.31 -
2.37. Assume two weights exceed 4. Then, only two weights, say,
wi1 and wi2, are less than or equal to 4. With these two
weights it is necessary to encode the decimal digits 0, 1,
2, 3, and 4 by assigning binary digits 0's and 1's to the
ai's in the formula a1wi1+a2wi2. Since there are only four
ways of making this assignment, the five decimal digits can
not be represented. Thus, no more than one weight can
exceed 4.
2.38. Divide the weights of the code into two groups: those which
are used in the representation of the decimal digit 0 and
those which are not used in this representation. Let the
sum of the weights in the first group be Ewi and the sum
of the weights in the second group be Ewj. Clearly,
Ewi=0. By the definition of a self-complementing code,
those weights which are not used to represent the decimal
digit 0 must be used to represent the decimal digit 9.
Hence, Ewj=9. Combining these results, Ewi+Ewj=9.
2.39. Assume three weights are negative and only one weight is
positive. There can exist at most 9 non-negative
combinations of the four weights. Therefore it is
impossible to represent the ten non-negative digits which
must be coded. Hence, at most two weights can be negative.
2.40. (a) 011100101101100110000
9 6 0
(b) 101100001010111011001
X + Y
(c) 1000011110111111001001100101
C o d e
Page 32
- 2.32 -
2.41. (a) 101100101011100000110011
2 8 3
which is represented by B2B833 in hexadecimal.
(b) 010110101011110110110001
Z = 1
which is represented by 5ABDB1 in hexadecimal.
(c) 01000010011010010111010011110011
B i t s
which is represented by 426974F3 in hexadecimal.
2.42. (a)
Decimaldigit
7 6 5 4 3 2 1 Position
2 4 2 p3 1 p2 p1 Format
0 0 0 0 0 0 0 0
1 0 0 0 0 1 1 1
2 0 0 1 1 0 0 1
3 0 0 1 1 1 1 0
4 0 1 0 1 0 1 0
5 1 0 1 0 1 0 1
6 1 1 0 0 0 0 1
7 1 1 0 0 1 1 0
8 1 1 1 1 0 0 0
9 1 1 1 1 1 1 1
Page 33
- 2.33 -
2.42. (continued)
(b)
Decimaldigit
9 8 7 6 5 4 3 2 1 Position
b5 p4 b4 b3 b2 p3 b1 p2 p1 Format
0 1 1 1 0 0 1 0 1 0
1 0 0 0 0 1 1 1 1 0
2 0 0 0 1 0 1 1 0 1
3 0 0 0 1 1 0 0 1 1
4 0 0 1 0 0 1 1 0 0
5 0 0 1 0 1 0 0 1 0
6 0 0 1 1 0 0 0 0 1
7 1 1 0 0 0 0 1 1 0
8 1 1 0 0 1 1 0 0 0
9 1 1 0 1 0 1 0 1 1
2.43.
12 11 10 9 8 7 6 5 4 3 2 1 Position
b8 b7 b6 b5 p4 b4 b3 b2 p3 b1 p2 p1 Format
(a) 1 1 1 0 1 0 0 1 0 1 1 1
(b) 0 1 0 1 0 1 0 0 1 0 0 1
(c) 1 0 0 1 0 0 1 0 0 1 0 0
2.44. (a) 7 6 5 4 3 2 1 Position0 0 1 1 0 0 0 Received code group
c*3c*2c*1=001 which indicates position 1 in error.
Transmitted code group: 0011001
(b) 7 6 5 4 3 2 1 Position1 1 1 1 0 0 0 Received code group
c*3c*2c*1=000 which indicates no error.
Transmitted code group: 1111000
Page 34
- 2.34 -
2.44. (continued)
(c) 7 6 5 4 3 2 1 Position1 1 0 1 1 0 0 Received code group
c*3c*2c*1=110 which indicates position 6 in error.
Transmitted code group: 1001100
2.45. (a) Position: 11 10 9 8 7 6 5 4 3 2 1
Format: poverall
b6b5p4b4b3b2p3b1p2p1Code group: 1 1 0 1 0 1 0 1 1 1 1
(b) If errors occur in bit positions 2 and 9, the received
code group is 11110101101. Using the received code
group, the overall parity bit is correct. The binary
check number is c*4c*3c*2c*1=1011. Since c*4c*3c*2c*1…0000 and
the overall parity bit is correct, a double error has
occurred.
2.46. Upon comparing each pair of code groups, the minimum
distance of this code is found to be three. Therefore, it
can be used for double-error detection or single-error
correction.