Vous êtes sur la page 1sur 34

Chapter 2

Problem 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

- 2.1 -

2.2.
Decimal

Quaternary

Quinary

Duodecimal

10

11

10

12

11

13

12

20

13

21

14

10

22

20

11

23

21

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

- 2.2 -

2.3. (a)

(d)

2.4. (a)

(d)

2.5. (a)

(c)

2.6. (a)

1
1101
+_____
1001
10110

(b)

1111
1001
+_____
111
10000

(c)

11 11 1
1100.01
+________
101.11
10010.00

111 11
11.011
+_______
10.111
110.010

(e)

111
111.01
+_______
11.10
1010.11

(f)

1 11
0.1110
+0.1011
______
1.1001

00
1
/1
/01
-____
110
111

(b)

001
/1
1
/0
/01.1
-_______
1011.0
1110.1

(c)

0110 1
1
/0
/0
/1
/.0
/0
-_______
11.01
101.11

0 0
/01
1
/.01
-______
10.10
10.11

(e)

01
0
1
//
00.11
/01
-________
11.1010
1.0011

(f)

0 1
1011
/.0
/0
-_______
10.11
1000.01

10111
_____
110
00000
10111
________
10111
10001010

(b)

11011
_____
1011
11011
11011
00000
_________
11011
100101001

1010
1.01
____
10 10
000 0
_______
1010
1100.10

(d)

101.1
11.01
_____
1 011
00 00
101 1
_________
1011
10001.111

________
10.1
1010)11001.0
-1010
____
101 0
-101
_____
0
0

(b)

____________
110011
10101)10000101111
-______
10101
11000
-10101
_____
11111
-10101
_____
10101
-10101
_____
0

- 2.3 -

2.6. (continued)
(c)

2.7. (a)

___________
110.101
110)100111.110
-____
110
111
-110
___
11 1
-11
____
0
110
-110
___
0
1

(d)

____________
101 1.01
101.1 )111101.1 11
-1011
____
10001
-_____
1011
110 1
-101
_____
1
1 0 11
-1
______
0 11
0

1
2012.0
+_______
1102.1
10121.1

(b)

11 1
220.12
+_______
121.20
1112.02

(c)

120
2
/0
/1
/02
-12121
_____
211

(d)

012 1
//
1
20
/02
/.12
-________
2121.20
2110.22

(e)

120.21
______
122
1011 12
10111 2
_________
12021
100221.02

(f)

12202
_____
21.2
10211 1
12202
102111
_________
1122000.1

(g)

_________
210.2
1012)221200.1
-2101
____
1110
-1012
____
210 1
-210
_____
1
0

(h)

___________
1 2.02
212.1 )11111.2 12
-_____
2121
1220 2
-1201
______
2
12 0 12
-12
_______
0 12
0

2.8. (a) Quaternary


a+b

b
0

1:0

1:0

1:1

1:0

1:1

1:2

Notation: x:y denotes carry digit x and sum digit y.

- 2.4 -

2.8. (continued)
a-b

b
0

1:3

1:2

1:1

1:3

1:2

1:3

Notation: x:y denotes borrow digit x and difference digit y.


ab

b
0

1:0

1:2

1:2

2:1

Notation: x:y denotes carry digit x and product digit y.


(b) Octal
a+b

b
0

1:0

1:0

1:1

1:0

1:1

1:2

1:0

1:1

1:2

1:3

1:0

1:1

1:2

1:3

1:4

1:0

1:1

1:2

1:3

1:4

1:5

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.

- 2.5 -

2.8. (continued)
a-b

b
0

1:7

1:6

1:5

1:4

1:3

1:2

1:1

1:7

1:6

1:5

1:4

1:3

1:2

1:7

1:6

1:5

1:4

1:3

1:7

1:6

1:5

1:4

1:7

1:6

1:5

1:7

1:6

1:7

Notation: x:y denotes borrow digit x and difference digit y.

ab

b
0

1:0

1:2

1:4

1:6

1:1

1:4

1:7

2:2

2:5

1:0

1:4

2:0

2:4

3:0

3:4

1:2

1:7

2:4

3:1

3:6

4:3

1:4

2:2

3:0

3:6

4:4

5:2

1:6

2:5

3:4

4:3

5:2

6:1

Notation: x:y denotes carry digit x and product digit y.

- 2.6 -

2.8. (continued)
(c) Hexadecimal
a+b

b
0

1:0

1:0 1:1

1:0 1:1 1:2

1:0 1:1 1:2 1:3

1:0 1:1 1:2 1:3 1:4

1:0 1:1 1:2 1:3 1:4 1:5

1:0 1:1 1:2 1:3 1:4 1:5 1:6

a
1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8 1:9

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8 1:9 1:A

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8 1:9 1:A 1:B

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8 1:9 1:A 1:B 1:C

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8 1:9 1:A 1:B 1:C 1:D

1:0 1:1 1:2 1:3 1:4 1:5 1:6 1:7 1:8 1:9 1:A 1:B 1:C 1:D 1:E

Notation: x:y denotes carry digit x and sum digit y.

- 2.7 -

2.8. (continued)
a-b

b
0

1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7 1:6 1:5 1:4 1:3 1:2 1:1

1:F

1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7 1:6 1:5 1:4 1:3 1:2
1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7 1:6 1:5 1:4 1:3
1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7 1:6 1:5 1:4
1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7 1:6 1:5
1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7 1:6
1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8 1:7
1:F 1:E 1:D 1:C 1:B 1:A 1:9 1:8

a
1:F 1:E 1:D 1:C 1:B 1:A 1:9
1:F 1:E 1:D 1:C 1:B 1:A
1:F 1:E 1:D 1:C 1:B
1:F 1:E 1:D 1:C
1:F 1:E 1:D
1:F 1:E

Notation: x:y denotes borrow digit x and difference digit y.

- 2.8 -

2.8. (continued)
ab

b
0

1:0 1:4 1:8 1:C 2:0 2:4 2:8 2:C 3:0 3:4 3:8 3:C

1:4 1:9 1:E 2:3 2:8 2:D 3:2 3:7 3:C 4:1 4:6 4:B

1:2 1:8 1:E 2:4 2:A 3:0 3:6 3:C 4:2 4:8 4:E 5:4 5:A

1:5 1:C 2:3 2:A 3:1 3:8 3:F 4:6 4:D 5:4 5:B 6:2 6:9

1:0 1:8 2:0 2:8 3:0 3:8 4:0 4:8 5:0 5:8 6:0 6:8 7:0 7:8

1:2 1:B 2:4 2:D 3:6 3:F 4:8 5:1 5:A 6:3 6:C 7:5 7:E 8:7

1:4 1:E 2:8 3:2 3:C 4:6 5:0 5:A 6:4 6:E 7:8 8:2 8:C 9:6

1:6 2:1 2:C 3:7 4:2 4:D 5:8 6:3 6:E 7:9 8:4 8:F 9:A A:5

1:8 2:4 3:0 3:C 4:8 5:4 6:0 6:C 7:8 8:4 9:0 9:C A:8 B:4

1:A 2:7 3:4 4:1 4:E 5:B 6:8 7:5 8:2 8:F 9:C A:9 B:6 C:3

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

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

1:0 1:2 1:4 1:6 1:8 1:A 1:C 1:E

1:2 1:5 1:8 1:B 1:E 2:1 2:4 2:7 2:A 2:D

Notation: x:y denotes carry digit x and product digit y.


2.9. (a)

(d)

11 1
31213(4)

(b)

0233
/3
1
//
00
/12(4)

(c)

1111 1
466735(8)

+_________
23102(4)

-_________
33321(4)

+__________
375627(8)

120321(4)

30031(4)

1064564(8)

6775
7
/0
/0
//
605(8)
-356742
_________
(8)
321643(8)

(e)

1 1
8C9F65(16)
+374B27
__________
(16)
C3EA8C(16)

- 2.9 -

(f)

C5 AF4
/
D6
/2B
//
05
/3(16)
-47E3C89
___________
(16)
8E473CA(16)

2.10. (a) 101101.1(2) = 1105 + 0104 + 1103 + 1102 + 0101


+ 1100 + 110-1
5
4
3
2
1
/ 12 + 02 + 12 + 12 + 02
+ 120 + 12-1
= 32 + 0 + 8 + 4 + 0 + 1 + 0.5
= 45.5(10)
(b) 110111.101(2) = 1105 + 1104 + 0103 + 1102 + 1101
+ 1100 + 110-1 + 010-2 + 110-3
5
4
3
2
1
/ 12 + 12 + 02 + 12 + 12
+ 120 + 12-1 + 02-2 + 12-3
= 32 + 16 + 0 + 4 + 2 + 1 + 0.5 + 0
+ 0.125
= 55.625(10)
(c) 2110(3) = 2103 + 1102 + 1101 + 0100
3
2
1
0
/ 23 + 13 + 13 +13
= 54 + 9 + 3 + 0
= 66(10)
(d) 12021.1(3) = 1104 + 2103 + 0102 + 2101 + 1100
+ 110-1
4
3
2
1
0
-1
/ 13 + 23 + 03 + 23 + 13 + 13
= 81 + 54 + 0 + 6 + 1 + 0.333...
= 142.333...(10)
(e) 362(8) = 3102 + 6101 + 2100
2
1
0
/ 38 + 68 + 28
= 192 + 48 + 2
= 242(10)
(f) 1475.2(8) = 1103 + 4102 + 7101 + 5100 + 210-1
3
2
1
0
-1
/ 18 + 48 + 78 + 58 + 28
= 512 + 256 + 56 + 5 + 0.25
= 829.25(10)

- 2.10 -

2.10. (continued)
(g) 2C3(16) = 2102 + C101 + 3100
2
1
0
/ 216 + 1216 + 316
= 512 + 192 + 3
= 707(10)
(h) AD.E(16) = A101 + D100 + E10-1
1
0
-1
/ 1016 + 1316 + 1416
= 160 + 13 + 0.875
= 173.875(10)
2.11. (a) 42(10) = 4101 + 2100
1
0
/ 1001010 + 101010
= 101000 + 10
= 101010(2)
(b) 78.5(10) = 7101 + 8100 + 510-1
1
0
-1
/ 1111010 + 10001010 + 1011010
= 1000110 + 1000 + 0.1
= 1001110.1
(2)
(c) 201(3) = 2102 + 0101 + 1100
2
1
0
/ 1011 + 011 + 111
= 10010 + 0 + 1
= 10011(2)
(d) 21.2(3) = 2101 + 1100 + 210-1
1
0
-1
/ 1011 + 111 + 1011

(e) 204(8)

= 110 + 1 + 0.101010...
= 111.101010...(2)
= 2102 + 0101 + 4100
/ 101000

2 + 010001 + 10010000

= 10000000 + 0 + 100
= 10000100(2)

- 2.11 -

2.11. (continued)
(f) 56.3(8) = 5101 + 6100 + 310-1
1
0
-1
/ 1011000 + 1101000 + 111000
= 101000 + 110 + 0.011
= 101110.011(2)
2.12. (a) 11010(2) = 1104 + 1103 + 0102 + 1101 + 0100
4
3
2
1
0
/ 12 + 12 + 02 + 12 + 02
= 1121 + 122 + 011 + 12 + 01
= 121 + 22 + 0 + 2 + 0
= 222(3)
(b) 73.2(8) = 7101 + 3100 + 210-1
1
0
-1
/ 2122 + 1022 + 222
= 2002 + 10 + 0.020202...
= 2012.020202...(3)
(c) 75(10) = 7101 + 5100
1
0
/ 21101 + 12101
= 2121 + 12
= 2210(3)
(d) 3D(16) = 3101 + D100
1
0
/ 10121 + 111121
= 1210 + 111
= 2021(3)

- 2.12 -

2.13. Using the polynomial method of converting 225(b) to


decimal:
225(b) = 2102 + 2101 + 5100
2
1
0
/ (2b + 2b + 5b )
(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)

Integers

Remainders
1632=81

1(10)/1(2)

0.752=1.50

1(10)/1(2)

812=40

1(10)/1(2)

0.502=1.00

1(10)/1(2)

402=20

0(10)/0(2)

202=10

0(10)/0(2)

102= 5

0(10)/0(2)

52= 2

1(10)/1(2)

22= 1

0(10)/0(2)

12= 0

1(10)/1(2)
163.75

(10) / 10100011.11(2)
Integers

Remainders
2022=101

0(10)/0(2)

0.92=1.8

1(10)/1(2)

1012= 50

1(10)/1(2)

0.82=1.6

1(10)/1(2)

502= 25

0(10)/0(2)

0.62=1.2

1(10)/1(2)

252= 12

1(10)/1(2)

0.22=0.4

0(10)/0(2)

122=

0(10)/0(2)

0.42=0.8

0(10)/0(2)

62=

0(10)/0(2)

32=

1(10)/1(2)

12=

1(10)/1(2)

202.9

...
(10) / 11001010.111001100
(2)

- 2.13 -

2.14. (continued)
(b)

Integers

Remainders
1633=54

1(10)/1(3)

0.753=2.25

2(10)/2(3)

543=18

0(10)/0(3)

0.253=0.75

0(10)/0(3)

183= 6

0(10)/0(3)

63= 2

0(10)/0(3)

23= 0

2(10)/2(3)

163.75

...
(10) / 20001.2020
(3)

Remainders

Integers

2023=67

1(10)/1(3)

0.93=2.7

2(10)/2(3)

673=22

1(10)/1(3)

0.73=2.1

2(10)/2(3)

223= 7

1(10)/1(3)

0.13=0.3

0(10)/0(3)

73= 2

1(10)/1(3)

0.33=0.9

0(10)/0(3)

23= 0

2(10)/2(3)

202.9

(c)

...
(10) / 21111.22002200
(3)

Remainders
1638=20

3(10)/3(8)

208= 2

4(10)/4(8)

28= 0

2(10)/2(8)
163.75

Integers
6(10)/6(8)

0.758=6.00

(10) / 243.6(8)
Integers

Remainders
2028=25

2(10)/2(8)

0.98=7.2

7(10)/7(8)

258= 3

1(10)/1(8)

0.28=1.6

1(10)/1(8)

38= 0

3(10)/3(8)

0.68=4.8

4(10)/4(8)

0.88=6.4

6(10)/6(8)

0.48=3.2
...
202.9
(10) / 312.714631463
(3)

3(10)/3(8)

(d)

Remainders
16316=10

3(10)/3(16)

1016= 0

10(10)/A(16)
163.75

Integers
0.7516=12.00

(10) / A3.C(16)

- 2.14 -

12(10)/C(16)

2.14. (continued)
Integers

Remainders
20216=12

10(10)/A(16)

0.916=14.4

14(10)/E(16)

1216= 0

12(10)/C(16)

0.416= 6.4
...
202.9
(10) / CA.E66
(16)

6(10)/6(16)

2.15. (a)

Remainders
1(2)/1(3)

1110001011=1001011
100101111=

11001

0(2)/0(3)

1100111=

1000

1(2)/1(3)

100011=

10

10(2)/2(3)

1011=

10(2)/2(3)
Integers

0.110111=10.0111

10(2)/2(3)

0.011111= 1.0101

1(2)/1(3)

0.010111= 0.1111

0(2)/0(3)

0.111111=10.1101

10(2)/2(3)

11100010.1101

...
(2) / 22101.21022102
(3)

(b)

Remainders
111000101000=11100

10(2)/2(8)

111001000=

11

100(2)/4(8)

111000=

11(2)/3(8)
Integers

0.11011000=110.1000

110(2)/6(8)

0.10001000=100.0000

100(2)/4(8)

11100010.1101

(c)

(2) / 342.64(8)

Remainders
111000101010=10110

110(2)/6(10)

101101010=

10

10(2)/2(10)

101010=

10(2)/2(10)

- 2.15 -

2.15. (continued)
Integers
0.11011010=1000.0010 1000(2)/8(10)
0.00101010=
1.0100
1(2)/1(10)
10.1000

10(2)/2(10)

0.10001010= 101.0000

101(2)/5(10)

0.01001010=

11100010.1101

(d)

(2) / 226.8125(10)
Remainders
10(2)/2(16)

1110001010000=1110
111010000=

1110(2)/E(16)
Integers

0.110110000=1101.0000 1101(2)/D(16)
11100010.1101
(2) / E2.D(16)
2.16. (a)

Remainders

Integers

101122=1202

1(3)/1(2)

0.12=0.2

0(3)/0(2)

12022= 212

1(3)/1(2)

0.22=1.1

1(3)/1(2)

2122= 102

1(3)/1(2)

1022=

12

1(3)/1(2)

122=

1(3)/1(2)

22=

0(3)/0(2)

12=

1(3)/1(2)

10112.1

(b)

...
(3) / 1011111.0101
(2)

Remainders
1011222=102

21(3)/7(8)

0.122= 2.2

2(3)/2(8)

0.222=12.1

12(3)/5(8)

10222=

10(3)/3(8)

122=

1(3)/1(8)

10112.1

(c)

Integers

...
(3) / 137.2525
(2)

Remainders
10112101=100
100101=

12(3)/5(10)

Integers
0.1101=10.1

100(3)/9(10)

10112.1

...
(3) / 95.33
(10)

- 2.16 -

10(3)/3(10)

2.16. (continued)
(d)
10112121=12

120(3)/F(16)

12121= 0

12(3)/5(16)

10112.1

2.17. (a)

1 . 1

2(8)
8

9 .

D(16)

3 . 4(8)
8

001010001011.1000(2)

(c)

B .

8(16)

2 . 2

6(8)
8

010111100010.010010110(2)

(d)

2 .

B(16)

6 . 5(8)
8

011100100110.1010(2)

2.18. (a)

3
9

6 .

A(16)

7 . 5(8)
9

0.1121=12.1

...
(3) / 5F.55
(16)

000111111001.001111010(2)

(b)

Integers

Remainders

011111.101(2)

- 2.17 -

12(3)/5(16)

2.18. (continued)
(b)

4
9

5 . 1(8)
9

100101.001(2)
(c)

6
9

1 . 3(8)
9

110001.011(2)
(d)

4 . 0

6(8)
9

111010100.000110(2)

2.19. (a)

1
9

C . 3(16)
9

00011100.0011(2)
(b)

F
9

2 . C(16)
9

11110010.1100(2)
(c)

0 . B(16)
9

010001010000.1011(2)
(d)

A . 5

9(16)
9

100011101010.01011001(2)

- 2.18 -

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
- be the (r-1)'s-complement of N.
(b) Let N
N = rn - r-m - N

Therefore,

- is
The (r-1)'s-complement of N
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

- 2.19 -

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

- 2.20 -

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)

- 2.21 -

2.25. Using 1's-complements:


6

(a) N1 = 1101101
N2 = 0110110

(b) N1 = 010100
N2 = 110000

N1 =
1101101
- = + 1001001
+ N
2
_________
1 0110110
+ _______
1
0110111

N1 =
010100
+ N2 = + 001111
______
100011

(c) N1 = 10010.00111
N2 = 00101.11000

N1 =
10010.00111
+ N2 = +_____________
11010.00111
1 01100.01110
+ ___________
1
01100.01111

(d) N1 = 10110.0100
N2 = 01011.1101

(e) N1 = 01101.1011
N2 = 10110.1100

N1 =
10110.0100
- = + 10100.0010
+ N
2
____________
1 01010.0110
+ __________
1
01010.0111

N1 =
01101.1011
+ N2 = + 01001.0011
__________
10110.1110

(f) N1 = 00101.100100
N2 = 11010.010011

6
6

N1 =
00101.100100
+ N2 = + 00101.101100
____________
01011.010000

Using 2's-complements:
6

(a) N1 = 1101101
N2 = 0110110
(b) N1 = 010100
N2 = 110000

6
6

N1 =
1101101
=
+ N2 = +_________
1001010
1
/ 0110111
N1 =
010100
=
+ N2 = + 010000
______
100100

- 2.22 -

2.25. (continued)
6

(c) N1 = 10010.00111
N2 = 00101.11000

N1 =
10010.00111
=
+ N2 = +_____________
11010.01000
1
/ 01100.01111

(d) N1 = 10110.0100
N2 = 01011.1101

(e) N1 = 01101.1011
N2 = 10110.1100

N1 =
10110.0100
=
+ N2 = +____________
10100.0011
1
/ 01010.0111

N1 =
01101.1011
=
+ N2 = + 01001.0100
__________
10110.1111

(f) N1 = 00101.100100
N2 = 11010.010011

N1 =
00101.100100
=
+ N2 = + 00101.101101
____________
01011.010001

2.26. Using 1's-complements:


(a) N1 = 0s10110
N2 = 0s01101

N1 =
0s10110
+ N2 = +_________
1s10010
1 0s01000
+ _______
1
0s01001

(b) N1 = 0s010111
N2 = 0s110100

N1 =
0s010111
+ N2 = + 1
________
s001011
1s100010

(c) N1 = 0s110.1001
N2 = 0s011.0100

(d) N1 = 0s10101.1
N2 = 0s10101.1

6
6

N1 =
0s110.1001
+ N2 = +____________
1s100.1011
1 0s011.0100
+ __________
1
0s011.0101
N1 =
0s10101.1
+ N2 = + 1
_________
s01010.0
1s11111.1

- 2.23 -

2.26. (continued)
6

(e) N1 = 0s101.11000
N2 = 0s010.01011

N1 =
0s101.11000
+ N2 = +_____________
1s101.10100
1 0s011.01100
+ ___________
1
0s011.01101

(f) N1 = 0s010111.10101
N2 = 0s111010.11000

6
6

N1 =
0s010111.10101
- = + 1 000101.00111
+ N
2
______________
s
1s011100.11100

Using 2's-complements:
(a) N1 = 0s10110
N2 = 0s01101

N1 =
0s10110
=
+ N2 = +_________
1s10011
1
/ 0s01001

(b) N1 = 0s010111
N2 = 0s110100

N1 =
0s010111
=
+ N2 = + 1
________
s001100
1s100011

(c) N1 = 0s110.1001
N2 = 0s011.0100

N1 =
0s110.1001
=
+ N2 = +____________
1s100.1100
1
/ 0s011.0101

(d) N1 = 0s10101.1
N2 = 0s10101.1

N1 =
0s10101.1
=
+ N2 = +___________
1s01010.1
1
/ 0s00000.0

(e) N1 = 0s101.11000
N2 = 0s010.01011

6
6

(f) N1 = 0s010111.10101
N2 = 0s111010.11000

N1 =
0s101.11000
=
+ N2 = +_____________
1s101.10101
1
/ 0s011.01101
6
6

- 2.24 -

N1 =
0s010111.10101
=
+ N2 = + 1
______________
s000101.01000
1s011100.11101

2.27. Using 9's-complements:


6

(a) N1 = 7842
N2 = 3791

(b) N1 = 265
N2 = 894

N1 =
7842
- = + 6208
+ N
2
______
1 4050
+ ____
1
4051

N1 =
265
+ N2 = + 105
___
370

(c) N1 = 508.3
N2 = 094.7

N1 =
508.3
+ N2 = +_______
905.2
1 413.5
+ _____
1
413.6

(d) N1 = 073.68
N2 = 538.90

(e) N1 = 427.08
N2 = 089.30

N1 =
0.73.68
- = + 461.09
+ N
2
______
534.77

N1 =
427.08
- = + 910.69
+ N
2
________
1 337.77
+ ______
1
337.78

(f) N1 = 0804.20
N2 = 3621.47

6
6

N1 =
0804.20
+ N2 = + 6378.52
_______
7182.72

Using 10's-complements:
6

(a) N1 = 7842
N2 = 3791
(b) N1 = 265
N2 = 894

6
6

N1 =
7842
=
+ N2 = +______
6209
1
/ 4051
N1 =
265
=
+ N2 = + 106
___
371

- 2.25 -

2.27. (continued)
(c) N1 = 508.3
N2 = 094.7

N1 =
508.3
=
+ N2 = +_______
905.3
1
/ 413.6

(d) N1 = 073.68
N2 = 538.90

(e) N1 = 427.08
N2 = 089.30

N1 =
073.68
=
+ N2 = + 461.10
______
534.78

N1 =
427.08
=
+ N2 = +________
910.70
1
/ 337.78

(f) N1 = 0804.20
N2 = 3621.47

N1 =
0804.20
=
+ N2 = + 6378.53
_______
7182.73

2.28. Using 9's-complements:


(a) N1 = 0s546
N2 = 0s232

(b) N1 = 0s384
N2 = 0s726

N1 =
0s546
+ N2 = +_______
1s767
1 0s313
+ _____
1
0s314

N1 =
0s384
+ N2 = + 1
_____
s273
1s657

(c) N1 = 0s326.4
N2 = 0s087.2

(d) N1 = 0s076.23
N2 = 0s209.40

N1 =
0s326.4
+ N2 = +_________
1s912.7
1 0s239.1
+ _______
1
0s239.2

6
6

N1 =
0s076.23
+ N2 = + 1
________
s790.59
1s866.82

- 2.26 -

2.28. (continued)
6

(e) N1 = 0s406.9
N2 = 0s406.9

N1 =
0s406.9
- = + 1 593.0
+ N
2
_______
s
1s999.9

(f) N1 = 0s063.40
N2 = 0s240.36

N1 =
0s063.40
- = + 1 759.63
+ N
2
________
s
1s823.03

Using 10's-complements:
(a) N1 = 0s546
N2 = 0s232

(b) N1 = 0s384
N2 = 0s726

N1 =
0s546
=
+ N2 = +_______
1s768
1
/ 0s314

N1 =
0s384
=
+ N2 = + 1
_____
s274
1s658

(c) N1 = 0s326.4
N2 = 0s087.2

6
6

(d) N1 = 0s076.23
N2 = 0s209.40
(e) N1 = 0s406.9
N2 = 0s406.9
(f) N1 = 0s063.40
N2 = 0s240.36

N1 =
0s326.4
=
+ N2 = +_________
1s912.8
1
/ 0s239.2
6

N1 =
0s076.23
=
+ N2 = + 1
________
s790.60
1s866.83
N1 =
0s406.9
=
+ N2 = +_________
1s593.1
1
/ 0s000.0

6
6

N1 =
0s063.40
=
+ N2 = + 1
________
s759.64
1s823.04

- 2.27 -

2.29.

=
A=1s0111010
=
B=0s0101101
=
(b) A-B = A+B

A=0s1000110
B=1s1010011
(a) A+B
A =

0s1000110

A =
0s1000110
=
+ B = + 0
_________
s0101101
0s1110011

+ B = +___________
1s1010011
1
/ 0s0011001
=
(c) B-A = B+A
B =
1s1010011
=
+ A = +___________
1s0111010
1
/ 1s0001101
2.30.

= =
(d) -A-B = A+B
=
A =
1s0111010
=
+ B = + 0
_________
s0101101
1s1100111
=
A=1s398.3
=
B=0s245.8

A=0s601.7
B=1s754.2

=
(b) A-B = A+B

(a) A+B
A =

0s601.7

A =
0s601.7
=
+ B = + 0
_______
s245.8
0s847.5

+ B = +_________
1s754.2
1
/ 0s355.9
=
(c) B-A = B+A
B =
1s754.2
=
+ A = +_________
1s398.3
1
/ 1s152.5
2.31.

-=1 0101001
A
s
-=0 0010011
B
s
(b) A-B = A+B

A=0s1010110
B=1s1101100
(a) A+B
A =

= =
(d) -A-B = A+B
=
A =
1s398.3
=
+ B = + 0
_______
s245.8
1s644.1

0s1010110

+ B = +___________
1s1101100
1 0s1000010
+ _________
1
0s1000011

- 2.28 -

A =
0s1010110
+ B = + 0
_________
s0010011
0s1101001

2.31. (continued)
(c) B-A = B+A

-+B
(d) -A-B = A
- =
A
1s0101001
+ B = + 0
_________
s0010011

B =
1s1101100
+ A = +___________
1s0101001
1 1s0010101
+ _________
1
1s0010110
2.32.

1s0111100

-=1 581.4
A
s
-=0 306.9
B
s

A=0s418.5
B=1s693.0

(b) A-B = A+B

(a) A+B
A =

0s418.5

A =
0s418.5
=
+ B = + 0
_______
s306.9
0s725.4

+ B = +_________
1s693.0
1 0s111.5
+ _______
1
0s111.6
(c) B-A = B+A

-+B
(d) -A-B = A
- =
A
1s581.4
+ B = + 0
_______
s306.9

B =
1s693.0
+ A = +_________
1s581.4
1 1s274.4
+ _______
1
0s274.5
2.33. (a) 100001010011
8

(b) 011001000010

(d) 100100010000010101000
8

1s888.3

(b)

10001001010110000011
(c)

(e) 100100101000110

2.34. (a)

(c) 101110000110

- 2.29 -

2.35.
(a)

(b)

(c)

(d)

7635

8324

-834
2

-864
1

0000

0000

0000

0000

0101

0111

0101

0111

1001

0010

1011

0110

0010

0100

0100

1011

0111

1001

1010

1010

1011

0110

1111

0101

0100

1011

1001

0100

1000

1101

1110

1001

1101

1000

1000

1000

0110

1111

1101

1111

Decimal
Digit

- and 864
-The 8324
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.

- 2.30 -

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

(b) 101100001010111011001
X

(c) 1000011110111111001001100101
C

- 2.31 -

2.41. (a) 101100101011100000110011


2

which is represented by B2B833 in hexadecimal.


(b) 010110101011110110110001
Z

which is represented by 5ABDB1 in hexadecimal.


(c) 01000010011010010111010011110011
B

which is represented by 426974F3 in hexadecimal.


2.42. (a)
Decimal 7
digit
2

p3

p2

1 Position
p1 Format

- 2.32 -

2.42. (continued)
(b)
Decimal 9
digit b
5
0
1

1 Position

p4

b4

b3

b2

p3

b1

p2

p1 Format

2.43.
12

11

10

b8

b7

b6

b5

p4

b4

b3

b2

p3

b1

p2

p1 Format

(a)

(b)

(c)

2.44. (a) 7 6 5 4 3 2 1
0 0 1 1 0 0 0

1 Position

Position
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
1 1 1 1 0 0 0

Position
Received code group

c*
3c*
2c*
1=000 which indicates no error.
Transmitted code group: 1111000

- 2.33 -

2.44. (continued)
(c) 7 6 5 4 3 2 1
1 1 0 1 1 0 0

Position
Received code group

c*
3c*
2c*
1=110 which indicates position 6 in error.
Transmitted code group: 1001100
2.45. (a) Position:
Format:
Code group:

11 10 9 8 7 6 5 4 3 2 1
poverall b6b5p4b4b3b2p3b1p2p1
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*
10000 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.

- 2.34 -

Vous aimerez peut-être aussi