Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Spring Semesters fall 2022

Assignment No.1
Computer Science-CS101
Roll no. bc220410284

Q.1 Divide the following string of binary numbers into 8-bit binary numbers and then convert
each 8bit binary number into equivalent text by using the ASCII code.
0101010101101110011010010111010001111001
Binary Deca Hexa Symbol
01010101 85 55 U
01101110 110 6E n
01101001 105 69 i
01110100 116 74 t
01111001 121 79 y

Sol:
01010101
128 64 32 16 8 4 2 1
0 1 0 1 0 1 0 1
Dec= 64+16+4+1
=85
Hex=85/16 Quotient=80 and Remainder=5
5/16 Quotient=0. and Remainder= 5
Hex = 55
Symbol for 55 ASCII code is ‘U'
01101110
128 64 32 16 8 4 2 1
0 1 1 0 1 1 1 0
Dec= 64+32+8+4+2
=110
Hex= 110/16 Quotient=96 Remainder =14
=14/16 Quotient……
= 6E
Symbol for 6E ASCII code is ‘n’
01101001
128 64 32 16 8 4 2 1
0 1 1 0 1 0 0 1
Dec= 105
Hex= 69
Symbol for 69 ASCII code is ‘i’
01110100
128 64 32 16 8 4 2 1
0 1 1 1 0 1 0 0
Dec= 116
Hex=74
Symbol for 74 ASCII code is ‘t’
01111001
128 64 32 16 8 4 2 1
0 1 1 1 1 0 0 1
Dec= 121
Hex= 79
Symbol for 79 ASCII code is ‘y’

Q.2
(a) Write the name of the smallest unit of memory.
(b) Fill in the blanks by performing memory unit conversions.
5 Bytes =40 bits
10 Kilo Bytes (KB)=10000 Bytes
15 Mega Bytes (MB) =15000 KB
20 Giga Bytes (GB)=20000 MB
25 Tera Bytes (TB)=25000 GB
Question No. 03
The following circuit diagram contains 9 gates and 8 inputs (A, B, C, D, E, F, G, and H). You
need to carefully observe the diagram and determine the inputs to produce 1 (One) at the output.

Ans.
A 1
B 1
C 0
D 0
E 1
F 1
G 0
H 0

You might also like