0% found this document useful (0 votes)
47 views5 pages

Spring 2022 - CS101 - 1 - BC220205617

This document contains the summary of an assignment submitted by Fatima Mubeen for her Introduction to Computing course. It includes 3 questions - the first asks to convert binary numbers to decimal and hexadecimal, the second asks for input combinations that would produce a logic gate output of 0, and the third asks to match file extensions to example file types. The document provides the questions, Fatima's solutions, and indicates the assignment is completed.

Uploaded by

fatima shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views5 pages

Spring 2022 - CS101 - 1 - BC220205617

This document contains the summary of an assignment submitted by Fatima Mubeen for her Introduction to Computing course. It includes 3 questions - the first asks to convert binary numbers to decimal and hexadecimal, the second asks for input combinations that would produce a logic gate output of 0, and the third asks to match file extensions to example file types. The document provides the questions, Fatima's solutions, and indicates the assignment is completed.

Uploaded by

fatima shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

SEMESTER SPRING 2022

Introduction to Computing (CS101)


ASSIGNMENT-01
NAME: FATIMA MUBEEN
VU ID: 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

(B) Convert the 8-digit binary into hexadecimal.    


                                        
 01001000

o By splitting 01001000 0100 1000 in groups:


4 8
Or
o By LCM 01001000 method:

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:

0010     1100


2 C

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.

BINARY FORM DECIMAL FORM HEXADECIMAL ASCII CODE


FORM
01001000 72 48 H
01101001 105 69 i
00101100 44 2C ,

Answer in textual form is= Hi,

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.

Extensio Example Answer


n
.mp3 The logo of the Virtual University of Pakistan
.zip The photo of the Rector on the faculty page.
.gif The audio tracks of programming talk-throughs.
.jpeg A compressed folder of admission documents.
Extension Answer

.mp3 The audio tracks of programming talk-throughs.

.zip A compressed folder of admission documents.

.gif The logo of the Virtual University of Pakistan

.jpeg The photo of the Rector on the faculty page.

SOLUTION:

THE END

You might also like