Solutions to
Homework Due 1/21/09
1.
Problem 2.1. Perform the following number system conversions.
(e) 10100.1101
2
= ?
16
(f) F3A5
16
= ?
2
(i) 101111.0111
2
= ?
8
(j) 15C.38
16
= ?
2
Solution: Solve by grouping
10100.1101
2
= 1,0100.1101
2
= 14.D
16
F3A5
16
= 1111,0011,1010,0101
2
101111.0111
2
= 101,111.011,1 00
2
= 57.34
8
15C.38
16
= 0001,0101,1100.0011,1000
2
= 1,0101,1100.0011,1
2
2.
Problem 2.2. Convert the following octal numbers into binary and hexadecimal
(e) 5436.15
8
= ?
2
= ?
16
(f) 13705.207
8
= ?
2
= ?
16
Solution: Solve by converting each octal digit to groups of three binary bits, regroup the binary bits into groups of 4, and convert each group of 4 bits into a hexadecimal digit.
5436.15
8
= 101,100,011,110.001,101
2
= 1011,0001,1110.0011,01 00
2
= B1E.34
16
13705.207
8
= 001,011,111,000,101.010,000,111
2
=
1,0111,1100,0101.0100,0011,1 000
2
= 17C5.438
16
3.
Problem 2.3. Convert the following hexadecimal numbers into binary and octal:
(e) 9E36.7A
16
= ?
2
= ?
8
(f) DEAD.BEEF
16
= ?
2
= ?
8
Solution: Solve by converting each hex digit to groups of four binary bits, regroup the binary bits into groups of 3, and convert each group of 3 bits into an octal digit. 9E36.7A
16
= 1001,1110,0011,0110.0111,1010
2
=
1,001,111,000,110,110.011,110,10 0
2
= 117066.364
8
DEAD.BEEF
16
= 1101,1110,1010,1101.1011,1110,1110,1111
2
=
1,101,111,010,101,101.101,111,101,110,111,1 00
2
= 157255.575674
8
4.
Problem 2.5. Convert the following numbers into decimal.
(d) 67.24
8
= ?
10
(e) 10100.1101
2
= ?
10
(j) 15C.38
16
= ?
10
Solution: Use the definition of a positional number system: D
i p
1
n d i
r i
67.24
8
= (6 x 8
1
+ 7 + 2 x 8
-1
+ 4 x 8
-2
)
10
= (48 + 7 + .25 + .0625)
10
= 55.3125
10
10100.1101
2
= (1 x 2
4
+ 0 x 2
3
+ 1 x 2
2
+ 0 x 2 + 0 x 2
0
+ 1 x 2
-1
+ 1 x 2
-2
+ 0 x 2
-3
+ 1 x 2
-4
)
10
= (16 + 4 + .5 + .25 + .0625)
10
= 20.8125
10
15C.38
16
= 1 x 16
2
+ 5 x 16 + 12 + 3 x 16
-1
+ 8 x 16
-2
= (256 + 80 + 12 + .1875 +
.03125)
10
= 348.21875
10
5.
Convert the answers you obtained for (d), (e), and (i) in the previous problem back into their original base.
Solution:
55.3125
10
= ?
8
0
8 6 R
6
8 .3125
8 .5
4.0
2.5
8 55 R
7
20.8125
10
= 67.24
8
20.8125
10
= ?
2
1
2 2
3 5
R
0
R
1
2
2 10 R
0
20 R
0
2 .25
0.5
20.8125
10
= 10100.1101
2
348.21875
10
= ?
16
0
16 1
16 .21875
3.5
16 .5
8.0
16 21
16 348 R
R
5
10
5
16
12
10
C
16
348.21875
10
= 1CB.38
16
6.
In hexadecimal A through F is used to represent digits with decimal values 10 through 15. This technique of using letters of the alphabet to represent digits above 10 can also be used for radix greater than 16. For example if the radix is 36, all of the letters of the alphabet would be used with G representing a digit with a decimal value of 16 and Z representing a digit with a decimal value of 35. Using this notation convert 48421654
10
to base 36.
Solution:
36
36
0
36 28
36 1037
36 37362
1345045
48421654
R
R
R
28
10
29
10
30
10
R
R
13
10
34
10
S
36
T
36
U
36
D
36
Y
36
48421654
10
= STUDY
36
7.
Problem 2.16. Determine the value of b.
(a) (1234) b
+ (5432) b
= (6666) b
(e) (302/20) b
= (12.1) b
(f) (14) b
= 5 b
Solution:
(a) (1234) b
+ (5432) b
= (b
3
+ 2b
2
+ 3b + 4)
10
+ (5b
= (6b
3
+ 6b
2
3
+ 4b
+ 6b + 6)
10
= (6666) b
2
+ 3b + 2)
10
Thus, the equation is true for any value of b; however, |b| must be grater than 6.
Ans : |b| > 6.
Note: The magnitude is important since for example b = -7 is a valid answer.
(e) Rewrite 302 b
/20 b
= 12.1
b
as 302 b
= 20 b
x 12.1
b
Converting the expression to base 10 gives:
3 b
2
2 1 b
2 b b
3 b 2 2 2 b 2
4 b
2 b
2
4 b
0
(
4)
0 b
0, 4
Since the digit 3 appears in the problem we know that b > 3, thus the correct answer is b = 4.
(f) (14) b
= b + 4 = 5, b = 5 - 4 = 1. However, since the digit 5 appears in the given expression, it is required that b > 5.
Ans: No solution.
8.
For what base dose 41
5 ?
Solution: Converting to base 10, 4 b
1
5 or 4b+1 = 5
2
= 25.
Therefore, 4b = 24 and b = 6.
Note: We can not assume that
5 2 b
25 b
.
9.
Convert (1234.5678)
9
to base 3.
Solution: Note that 9 = 3 2 ; thus, we can use groups of 2, and convert each digit.
(1234.5678)
9
= (01,02,10,11.12,20,21,22)
3
.
10.
My granddaughter, Mindy, just celebrated her 9 th birthday, and said she just can’t wait to be a teenager. I told her this problem can easily be solved by my Digital
Logic Design class. What radix should Mindy use so she can tell her friends that she is 13.
Solution: (13) b
= (1b + 3)
10
= 9
10
or b = 9 – 3 = 6.