Tutorial 1
Tutorial 1
Solutions
a) (11011.101)2
1 ∗ 24 + 1 ∗ 23 + 0 ∗ 22 + 1 ∗ 21 + 1 ∗ 20 + 1 ∗ 2−1 + 0 ∗ 2−2 + 1 ∗ 2−3
16 + 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125
Answer = 27.625
b) (432) in decimal is
5
4 ∗ 52 + 3 ∗ 51 + 2 ∗ 50
100 + 15 + 2
Answer = 117
c) (745) in decimal is
8
7 ∗ 82 + 4 ∗ 81 + 5 ∗ 80
448 + 32 + 5
Answer = 485
d) (BCAD.B) in decimal is
16
11 ∗ 163 + 12 ∗ 162 + 10 ∗ 161 + 13 ∗ 160 + 11 ∗ 16−1
45056 + 3072 + 160 + 13 + 0.6875
Answer = 48301.6875
2. Find the Octal value of following hexadecimal numbers by first converting to binary
a) (42BC)16
b) (568)16
Solutions
a) Octal value of (42BC)16
Binary value = 0100_0010_1011_1100 = 100_001_010_111_100
Answer = (41274)8
1
3. Convert decimals to binary
a) 38.315
b) 262
Solutions:
a) The binary value of 38.315 is
Remainder integer
38/2 = 19 0 0 .315 *2 = .630 0
19/2= 9 1 0.630*2 = 0.26 1
9/2 = 4 1
4/2 =2 0 0.26*2 = 0.52 0
2/2 = 1 0 0.52*2 = 0.04 1
Answer = 100110.0101
Answer = 100000110
Solution:
a) 101_011_100.011_111_101
534.375
a) 110_010_101.111_011_000
625.730
2
5. Find The binary value of the hexadecimal number
a) (408.D)
16
b) (26CD)
16
Solution:
a) Binary value of the hexadecimal number 408.D
(408.D) = 4 0 8 . D
16
0100 0000 1000 . 1101
Answer = 010000001000.1101
a) 25,478,036
b) 63,325,600
Solution
a) The 9’s complement of 25,478,036
[N] = (rn - 1) – (N) 9 9 9 9 9 9 9 9
r-1 r
2 5 4 7 8 0 3 6
(10 - 1) – 25478036
8
7 4 5 2 1 9 6 3
Answer = 74,521,963
Answer = 36,674,399
3
7. Find The 1’s and 2’s complement of the following numbers
a) 11010010
b) 01110010
Solution:
1’s complement 1 1 1 1 1 1 1 1
1 1 0 1 0 0 1 0
a) 11010010 = 00101101 0 0 1 0 1 1 0 1
1 1 1 1 1 1 1 1
b) 01110010 = 10001101
0 1 1 1 0 0 1 0
1 0 0 0 1 1 0 1
2’s complement
1 1 1 1 1 1 1 1
a) 11010010 = 00101110 1 1 0 1 0 0 1 0
+1
0 0 1 0 1 1 0 1
b) 01110010 = 10001101 1 1 1 1 1 1 1 1
0 1 1 1 0 0 1 0
+1
1 0 0 0 1 1 1 0
4
9. Perform signed subtraction of (6)10 – (9)
Solution: 10 and indicate the sign bit
Signed bit
(6)
10 0 0110
)
- (9 10 1 0111
1 1101
5
Optional explain other coding examples
such as BCD :
6
Decode the following ASCII code:
1010011 1110100 1100101 1110110 1100101 0100000 1001010 1101111 1100010 1110011
Answer is Steve Jobs