Spring 2022 - CS101 - 1 - BC220205617
Spring 2022 - CS101 - 1 - BC220205617
Question No. 1
Alice and Bob are playing a game by encoding their messages in an 8-bit binary. Trudy wants to
understand or modify their messages. You have to help Trudy to convert encoded messages into
a readable format by performing the following operations.
● 01001000
● 01101001
● 00101100
SOLUTION:
(A) Convert the above 8-digit binary numbers into decimals.
01001000
0×27+1×26+0×25+0×24+1×23+0×22+0×21+0×20
=0+64+0+0+8+0+0+0
=7210
01101001
0×27+1×26+1×25+0×24+1×23+0×22+0×21+1×20
=0+64+32+0+8+0+0+1
=10510
00101100
0×27+0×26+1×25+0×24+1×23+1×22+0×21+0×20
=0+0+32+0+8+4+0+0
=4410
010010002 = 7210
1 72 - 8
6
4
010010002 = 4816
01101001
o By splitting 01101001 in groups:
0110 1001
6 9
Or
o By LCM 01101001 method:
011010012 = 10510
16 105 - 9
6
011010012= 6916
00101100
o By splitting 00101100 in groups:
Or
o By LCM 01101001 method:
001011002 = 4410
16 44 - C
2
001011002 = 2C16
(C) Decode the 8-digit binary in textual form. By using the ASCII table.
Question No. 02
The diagram below shows a circuit with four gates and four inputs (A, B, C and D).
If the final output is 0, what are the possible states of inputs A, B, C and D?
SOLUTION:
By taking 0 as an output,
Output G E F A B C D
A 1
B 1
C 1
D 1
0 1 1 1 1 1 1 1
If only A and B are 1, the output E of the AND gate is 1, and the same with C and D. The
outputs, i.e., E and F, are the inputs of another AND gate, which provides an output to G. G
would be 1 if only E and F were 1. And providing 1 to NOT gate which gives 0 on the output.
Question No. 03
Match each extension to an example of data that it can store.
SOLUTION:
THE END