Homework I Solutions
Homework I Solutions
Homework I Solutions
13/11/2017
Department of Electrical and Electronic Engineering
b. (743.50)8
7 4 3 . 5 0
82 81 80 . 8-1 8-2
64 8 1 . 0.125 0.0156
7x64 4x8 3x1 . 5x0.125 0x0.0156
448 31 3 . 0.625 0
448+31+3 . 0.625
480 . 625
(10 pts)
2. Express (3249)10, (258)10, (71)10, in
a. BCD
b. Excess-3
c. 2421
(15 pts)
Decimal 3 2 4 9
BCD 0011 0010 0100 1001
Excess-3 0110 0101 0111 1100
2421 0011 0010 0100 1111
EENG/INFE115 1 |Page
Eastern Mediterranean University
13/11/2017
Department of Electrical and Electronic Engineering
Decimal 2 5 8
BCD 0010 0101 1000
Excess-3 0101 1000 1011
2421 0010 1011 1110
Decimal 7 1
BCD 0111 0001
Excess-3 1010 0100
2421 1101 0001
EENG/INFE115 2 |Page
Eastern Mediterranean University
13/11/2017
Department of Electrical and Electronic Engineering
b. 130 – 200
10’s complement of 200 is 10 0 0
2 0 0
8 0 0
(10 pts)
4. Convert the following decimal numbers 60 and 34 to binary using the signed 2’s
complement representation and enough digits to accommodate numbers. Then
perform the binary equivalent of (+60) + (-34), (-60) + (+34) and (-60) + (-34).
(15 pts)
60 2= 30 0 34 2= 17 0
30 2= 15 0 17 2= 8 1
15 2= 7 1 8 2= 4 0
7 2= 3 1 4 2= 2 0
3 2= 1 1 2 2= 1 0
1 2= 0 1 1 2= 0 1
60 = (11110)2 34 = (100010)2
Therefore for sign 2’s complement representation of
+60 0111100 -60 1000100
+34 0100010 -34 1011110
(+ 60) 0111100
+ (- 34) 1011110
(+26) 10011010 most significant bit is discarded.
EENG/INFE115 3 |Page
Eastern Mediterranean University
13/11/2017
Department of Electrical and Electronic Engineering
(- 60) 1000100
+ (+ 34) 0100010
(- 26) 1100110 signed 2’s complement of -26.
(- 60) 1000100
+ (- 34) 1011110
(- 94) 10100010
-01011110 take the 2’s comp of 10100010 put (-) sign in front
EENG/INFE115 4 |Page
Eastern Mediterranean University
13/11/2017
Department of Electrical and Electronic Engineering
8. The following is a string of ASCII characters whose bit patterns have been converted
into hexadecimal for compactness: 4D 6F CF 72 C5 AC F3 A0 CC 41 D7. Of the 8 bits
in each pair of digits, the leftmost is a parity bit. The remaining bits are the ASCII
code.
a. Convert to bit form and decode the ASCII.
Hex Parity ASCII Hex Parity ASCII
4D 0 100 1101 M F3 1 111 0011 s
6F 0 110 1111 o A0 1 010 0000 SP
CF 1 100 1111 O CC 1 100 1100 L
72 0 111 0010 r 41 0 100 0001 A
C5 1 100 0101 E D7 1 101 0111 W
AC 0 110 0000 `
EENG/INFE115 5 |Page