Professional Documents
Culture Documents
a. Binary:
b. Octal:
2. Convert the following decimal numbers to the indicated bases (assume 2nd complement):
a. 68.625 to binary.
b. 68.625 to hex.
c. 68.625 to octal.
d. 54.6875 to binary.
e. 54.6875 to hex.
f. 54.6875 to octal.
g. -68.625 to binary.
h. -68.625 to hex.
i. -68.625 to octal.
j. 7562.45 to octal.
(a)
68.62510 to binary:
now 68 = s 64 32 16 8 4 2 1
0 1 0 0 0 1 0 0
.625 =
.625 x 2 = 1.25
.25 x 2 = 0.5
.5 x 2 = 1.0
.0 x 2 = 0.0
(b)
68.62510 to hex:
68.625 = 01000100.1010
68.625 = 0100 0100. 1010
68.625 = 4 4 . A
68.625 = 44.A16
(c)
68.62510 to octal:
68.625 = 01000100.1010
68.625 = 001 000 100 . 101 000
68.625 = 1 0 4 . 5
68.625 = 104.58
(d)
54.687510 to binary:
now 54 = s 64 32 16 8 4 2 1
0 0 1 1 0 1 1 0
.6875 =
.6875 x 2 = 1.375
.375 x 2 = 0.75
.75 x 2 = 1.5
.5 x 2 = 1.0
.0 x 2 = 0
(e)
54.687510 to hex:
54.6875 = 00110110.10110
54.6875 = 0011 0110.1011 0000
54.6875 = 3 6 .B
54.6875 = 36.B16
(f)
54.687510 to octal:
54.6875 = 00110110.10110
54.6875 = 000 110 110.101 100
54.6875 = 6 6 .5 4
54.6875 = 66.548
(g)
now 68 = s 64 32 16 8 4 2 1
0 1 0 0 0 1 0 0
.625 =
.625 x 2 = 1.25
.25 x 2 = 0.5
.5 x 2 = 1.0
.0 x 2 = 0.0
(h)
-68.62510 to hex:
-68.625 = 10111011.0110
-68.625 = 1011 1011. 0110
-68.625 = B B . 6
-68.625 = BB.616
(i)
-68.62510 to octal:
-68.625 = 10111011.0110
-68.625 = 010 111 011. 011 000
-68.625 = 2 7 3 . 3
-68.625 = 273.38
(j)
7562.4510 to octal:
3. Perform the arithmetic operations (+42) + (-13) and (-42) - (-13) in binary using the signed 2nd
complement representation for negative numbers.
a. (+42) + (-13) = 29
s 64 32 16 8 4 2 1
0 0 1 0 1 0 1 0 +
- (0 0 0 0 1 1 0 1)
s 64 32 16 8 4 2 1
0 0 1 0 1 0 1 0 +
1 1 1 1 0 0 1 1
------------------
0 0 0 1 1 1 0 1 (29) note : in addition we drop any carry
s 64 32 16 8 4 2 1
- (0 0 1 0 1 0 1 0) +
0 0 0 0 1 1 0 1
s 64 32 16 8 4 2 1
1 1 0 1 0 1 1 0 +
0 0 0 0 1 1 0 1
------------------
1 1 1 0 0 0 1 1 = -(0 0 0 1 1 1 0 1) = -29
4. Perform subtraction with the following unsigned binary numbers by taking the 2nd complement:
00011010 - 00010000
26 -
16
--
10
s 64 32 16 8 4 2 1
0 0 0 1 1 0 1 0 -
0 0 0 1 0 0 0 0
s 64 32 16 8 4 2 1
0 0 0 1 1 0 1 0 +
- (0 0 0 1 0 0 0 0)
s 64 32 16 8 4 2 1
0 0 0 1 1 0 1 0 +
1 1 1 1 0 0 0 0
------------------
0 0 0 0 1 0 1 0 = 1010
a.
s 16 8 4 2 1
1 0 1 0 1 1 +
1 1 1 0 0 0
------------------
1 0 0 0 1 1 (drop carry)
= -(011101) = -29
b.
s 16 8 4 2 1
0 0 1 1 1 0 +
-(1 1 0 0 1 0)
s 16 8 4 2 1
0 0 1 1 1 0 +
0 0 1 1 1 0
------------------
0 1 1 1 0 0 = (28)
6. What is the largest unsigned binary number that can be represented on 16 bits? What is its
decimal and hex equivalent.
a.
29510 = 1001001112
862010 = 100001101011002
b.
29510 = 0010 1001 0101 BCD
862010 = 1000 0110 0010 0000 BCD
9. The character A is transmitted on a network using even parity. Write down the binary bits
transmitted.
(Parity Bit) 64 32 16 8 4 2 1
0 1 0 0 0 0 0 1
10. What is the decimal value of the binary number 1000 if it is taken as a 2nd complement.