0% found this document useful (0 votes)
12 views

Tutorial 1 - Solution

Uploaded by

Chay Khai Ling
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Tutorial 1 - Solution

Uploaded by

Chay Khai Ling
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Number System Conversion Summary

1(a) 301.1210
Integral part: Decimal part:
2 301 0.12 X 2 = 0.24 0 a-1
2 150 r = 1 = a0 (LSB) 0.24 X 2 = 0.48 0 a-2
0.48 X 2 = 0.96 0 a-3
2 75 r = 0 = a1
0.96 X 2 = 1.92 1 a-4
2 37 r = 1 = a2
0.92 X 2 = 1.84 1 a-5
2 18 r = 1 = a3 0.84 X 2 = 1.68 1 a-6
0.68 X 2 = 1.36 1 a-7
2 9 r = 0 = a3
0.36 X 2 = 0.72 0 a-8
2 4 r = 1 = a4
0.72 X 2 = 1.44 1 a-9
2 2 r = 0 = a5 0.44 X 2 = 0.88 0 a-10

2 1 r = 0 = a6 0.88 X 2 = 1.76 1 a-11

0 r = 1 = a7 (MSB) 0.76 X 2 = 1.52 1 a-12


30110 = 1 0010 11012 0.12
…10 = 0.000111101011…2
301.1210 = 1 0010 1101.000111101011…2
1(b)
100110102 = 1x27 + 0x26 + 0x25 + 1x24 + 1x23 + 0x22 + 1x21 + 0x20
= 15410
2(a)
Base 2 => base 8
1110100112 => 111 010 0112
7 2 38
Both equal to 46710
Base 2 => base 16
1110100112 => 0001 1101 00112
1 D 316

2(b)
Base 2 => base 8
11111110.00012 => 011 111 110 . 000 1002
3 7 6 . 0 48
Both equal to 254.062510
Base 2 => base 16
11111110.00012 => 1111 1110 . 00012
F E 116

3(a)
Base 16 => base 2
AC16 = 1010 11002

3(b)
Base 16 => base 2
4)
Base 10 => base 16 16 384 0.74 X 16 = 11.84 11 = B
0.84 X 16 = 13.44 13 = D
384.7410 => 180.BD16 16 24 r=0

16 1 r=8
0 r=1

Direct method:
1 8 0 . B D16

01 20 00 . 23 314

180.BD16 = 012000.23314

Indirect method:
(Hex => Binary -> 2 digits in base 4)
Base 16 => base 2 => base 4 (D.I.Y.)
180.BD => 0001 1000 0000. 1011 1101
0 1 2 0 0 0 . 2 3 3 14
012000.23314 = 1x44 + 2x43 . 2x4-1+3x4-2+3x4-3+1x4-4
= 256+128+0.5+0.1875+0.046875+0.00390625
= 384.7382810 = ~384.7410
5(a) 111.1112 augend 7.87510
+ 1112 addend +710
---------------- -------------
1 110.1112 sum 14.87510
---------------- -------------

5(b) 1 10110010102
6(a) 000112

6(b) 101100102 minuend


- 1111012 subtrahend
---------------------
11101012 difference
---------------------
multiplicand
7(a) 1100102 7(b)
multiplier
x 101112 1000111000112
110010 227510
110010
10010110
110010
101011110
000000
101011110
110010
final product
100011111102
5010
x 2310
115010
8(a)
11000 r 10 24 r 2
1101 100111010 13 314
1101 26
01101 54
1101 52
00000010 2

8(b)
10001 r1000
17 r8
9. S&M 1’s complement 2’s complement
478 000111011110 000111011110 000111011110
-280 100100011000 111011100111 111011101000
-2 100000000010 111111111101 111111111110
10(a)
- 001011 => 110101 (2’s)
Direct method:
001111 = 15
+ 110101 = 2’s 001111
- 001011 (Two +ve number)
(1) 000100
000100
Ignore due to 6 bits required
=> 001111 – 001011 = 000100

10(b)
-11100101 => 00011011 (+ve number)
00110011
+ 00011011
01001110

=> 00110011 – 11100101= 01001110

10(c)
11100011
+ 11111010
(1) 11011101

=> 11100011 + 11111010 = 11011101


2’s complement: 1’s complement:
11(a) 11(a)
N = 2110 = 010101 N = 2110 = 010101
N = 1110 = 001011 N = 1110 = 001011

010101 010101
+ 001011 + 001011
100000 100000
overflow overflow

11(b) 11(b)
N = 1410 = 001110, N*= 110010
N = 3210 = 100000, N* = 100000 N = 1410 = 001110, N*= 110001
N = 3210 = 100000
110010
+ 100000 110001
1 010010 + 100000
ignore
010001
+ 1
010010
2’s complement: 1’s complement:
11(c) 11(c)
N = 1310 = 001101 N = 1310 = 001101
N = 1210 = 001100, N*=110100 N = 1210 = 001100, N = 110011
Ans: 000001 Ans: 000001

11(d) 11(d)
N = 1110 = 001011, N* = 110101 N = 1110 = 001011, N = 110100
N = 2110 = 010101, N* = 101011 N = 2110 = 010101, N = 101010

110101 110100
+ 101011 + 101010
1 100000 1 011110
ignore + 1 =>overflow
011111

11(e)
N = 2510 = 011001, N*= 100111 11(e)
N = 1810 = 010010 N = 2510 = 011001 N = 100110
Ans: 111001 N = 1810 = 010010
Ans: 111000
12 )
(a) 10101102 = 8610 = 1000 0110BCD

(b) 1100100.112 = 100.7510 = 0001 0000 0000.0111 0101BCD

13
(a)
0110 0100
+ 0011 0011
1001 0111

(b)
1001 0111 1000
+ 1001 0101 0001
1 0011 1100 1001
0110 0110
0001 1001 0010 1001
14)
(a) 3410 = 1000102
110011Gray

(b) 11000010001Gray
= 100000111102

15)
(b) Error (6 1’s)
* now 6 bit of 1, if add another 1, become odd parity, then is
error (because question ask odd parity codes are in error).

(b) no error (3 1’s)


* Now 3 1’s, if add another 1, become even parity, then is no
error (because question ask odd parity codes are in error).

You might also like