Coen 1
Fall 2000
Homework 2 ANSWERS
1. Decimal
a. 512 + 256 + 64 + 32 + 4 + 1 = 86910
b. 410
c. 64 + 32 + 16 + 8 + 4 + 2 + 1 = 12710
Octal
Simply group as sets of 3 binary digits, starting at the right, and write down the equivalent base 8 number
a. 001 101 100 101 = 15458
b. 100 = 48
Hexadecimal
This time group in sets of 4 binary digits. Hexadecimal requires 16 digits, for the equvalents of the decimal values 0 to 15. So use the letters A (10), B (11), C (12), D (13), E (14), F (15).
a. 0011 0110 0101 = 36516
b. 0100 = 416
c. 0111 1111 = 7F16
2. a. 25510 = 111111112
b. 16310 = 101000112
c. 122010 = 100110001002
3.
a. 111111111112
+000000000012
1000000000002
b. 101110011012
+ 011000100102
1000110111112
c. 013758
+ 514228
530178
d. 82FA16
+ 912116
1141B16
4. a. 110010010112
- 000110001112
101100001002
b. 10000000002
-00000000012
1111111112
5. The truth table is given below:
A |
B |
C |
D |
B or C |
A and (prev col) |
(prev col) nand D |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
C is the carry in