Tutorial 1.2 Solution-Benm 1143 Logic Circuit
Tutorial 1.2 Solution-Benm 1143 Logic Circuit
c) 1110101 = 0001010
b) 11010111 = 00101000
2.
d) 00001 = 11110
4.
5.
6.
b) -85 = 11010101
c) +100 = 01100100
d) -123 = 11111011
Express each decimal number in binary as an 8-bit number in the 1s complement form:
a) -34 = 11011101
b) +57 = 00111001
c) -99 = 10011100
d) +115 = 001110011
Express each decimal number in binary as an 8-bit number in the 2s complement form:
a) +12 = 00001100
c) +101 = 01100101
Determine the decimal value of each signed binary number in the sign-magnitude form:
a) 10011001 = - (16 + 8 +1) = -25
b) 01110100 = +116
Determine the decimal value of each signed binary number in the 1s complement form:
a) 10011001 = (-128 + 16 + 8 + 1) +1 = -102
b) 01110100 = + 116
c) 10111111 = (-128 +32+ 16+8+4+2+1) + 1 = -64
8.
Determine the decimal value of each signed binary number in the 2s complement form:
a) 10011001 = -128 + 16 + 8 + 1 = -103
b) 01110100 = +116
c) 10111111 = -128 + 32 + 16 + 8 + 4 + 2 + 1 = -65
9.
Convert each pair of decimal numbers to binary and add using the 2s complement forms:
(using hardware subtract execution for the negative number only)
a) 33 and 15
+33 = 00100001 , +15 = 00001111
00100001 + 00001111 = 00110000
b) 56 and -27
+56 = 00111000 , -27= 11100100 + 1 = 11100101
00111000 + 11100101 = 100011101
Zarina/Niza/K.g
BENM 1143
c) -46 and 25
-46 = 11010001 + 1 = 11010010 , +25 = 00011001
11010010 + 00011001 = 11101011
d)
10.
Perform each of the following subtractions of the signed numbers (using hardware
subtract execution for the negative number only by 2s complement):
a) 00001001 00000100
00000100 change to 2s complement = 11111011 + 1 = 11111100
00001001 + 11111100 = 1 00000101 = 00000101
b) 11101000 - 00010100
00010100 change to 2s complement = 11101011 + 1 = 11101100
11101000 + 11101100 = 1 11010100
c) 00001011 11110110
11110110 change to 2s complement = 00001001 + 1 = 00001010
00001011 + 00001010 = 00010101
d)
10000111 11100001
11100001 change to 2s complement = 00011110 + 1 = 00011111
10000111 + 00011111 = 10100110
11.
12.
13.
14.
d) 10011000 + 10010111 =
Zarina/Niza/K.g
BENM 1143
15.
0010
0011BCD
0110
0101
65
0101
1000
58
1011
1101
+ 0110 +0110
0001
0010
0011
123
b) 17 + 12 = 0010 1001BCD
17.
b) 000100 = 000111
c) 11000010001= 10000011110
19.
c)10111111 = 11100000
18.
b) 01110100 = 01001110
b) 0111110
c) 1000010
BINARY
HEX
0000011
03
0000000
00
space
0100000
20
I
N
P
U
T
space
A
,
B
Zarina/Niza/K.g
BENM 1143
20.
b) 011101010 error
c) 10111111010001010
21.
22.
b) 00110001
c) 010101010101010
An even parity system receives the following code groups: 1011, 11011, 1101110,
1110100, 10010111001, 101011101011 and 11000101010101.
Determine which
Assign the proper odd parity bit to the following code groups
a) 1010 11010 (add 1 at the right most)
b) 111000 0111000 (add 0 at the right most)
c) 101101011111 0101101011111 (add 0 at the right most)
Zarina/Niza/K.g