Hardware Reference
In-Depth Information
PROBLEMS
1. Convert the following numbers to binary: 1984, 4000, 8192.
2. What is 1001101001 (binary) in decimal? In octal? In hexadecimal?
3. Which of the following are valid hexadecimal numbers? BED, CAB, DEAD,
DECADE, ACCEDED, BAG, DAD.
4. Express the decimal number 100 in all radices from 2 to 9.
5. How many different positive integers can be expressed in k digits using radix r num-
bers?
6. Most people can only count to 10 on their fingers; however, computer scientists can do
better. If you regard each finger as one binary bit, with finger extended as 1 and finger
touching palm as 0, how high can you count using both hands? With both hands and
both feet? Now use both hands and both feet, with the big toe on your left foot as a
sign bit for two's complement numbers. What is the range of expressible numbers?
7. Perform the following calculations on 8-bit two's complement numbers.
00101101
11111111
00000000
11110111
+ 01101111
+ 11111111
11111111
11110111
8. Repeat the calculation of the preceding problem but now in one's complement.
9. Consider the following addition problems for 3-bit binary numbers in two's comple-
ment. For each sum, state
a. Whether the sign bit of the result is 1.
b. Whether the low-order 3 bits are 0.
c. Whether an overflow occurred.
000
000
111
100
100
+ 001
+ 111
+ 110
+ 111
+ 100
10. Signed decimal numbers consisting of n digits can be represented in n
1 digits with-
out a sign. Positive numbers have 0 as the leftmost digit. Negative numbers are
formed by subtracting each digit from 9. Thus the negative of 014725 is 985274.
Such numbers are called nine's complement numbers and are analogous to one's com-
plement binary numbers. Express the following as three-digit nine's complement num-
bers: 6,
+
1, 0.
11. Determine the rule for addition of nine's complement numbers and then perform the
following additions.
0001
2, 100,
14,
0001
9997
9241
+ 9999
+ 9998
+ 9996
+ 0802
12. Ten's complement is analogous to two's complement. A ten's complement negative
number is formed by adding 1 to the corresponding nine's complement number, ignor-
ing the carry. What is the rule for ten's complement addition?
Search WWH ::




Custom Search