CS101 ASSIGNMENT 1 SOLUTION 2021

CS101 ASSIGNMENT 1 SOLUTION 2021, CS101 ASSIGNMENT 1 SOLUTION spring 2021, cs101 assignment 1 solution 2021 pdf.

Introduction to Computing

 

(CS101)

Assignment # 01

CS101 ASSIGNMENT 1 SOLUTION 2021

Spring 2021

 

Total marks = 20

 

 

24 May 2021

 

Also, See:

CS609 ASSIGNMENT 1 SOLUTION 2021

CS431 ASSIGNMENT 1 SOLUTION 2021

CS435 ASSIGNMENT 1 SOLUTION 2021

Cs204 Assignment 1 Solution Spring 2021

Please carefully read the following instructions before attempting assignment.

 

RULES FOR MARKING

It should be clear that your assignment would not get any credit if:

 

  • The submitted assignment does not open or file is corrupt.

 

  • Strict action will be taken if submitted solution is copied from any other student or from the internet.

 

You should consult the recommended books to clarify your concepts as handouts are not sufficient.

 

You are supposed to submit your assignment in .doc or docx format.

Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.

 

Objectives:

To understand how computers manipulate and store data.

 

To learn how computers are programmed by means of machine language instructions.

 

NOTE

 

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence, refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

 

If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline, no queries will be entertained in this regard.

 

For any query, feel free to email at:

[email protected]

 

Questions No 01                                                                                                                                          Marks (10)

 

Given is a snapshot of memory addresses E2 to F4 and CPU registers 0 to F. All bit patterns in the memory cells are represented in hexadecimal notation.

 

 

 

Figure 1: Snapshot of a program stored in main memory for execution

 

 

Assume that the Program Counter has E2 as its initial value. Using the information provided in the above Figure 1, answer the following questions.

 

  1. Determine the contents of register 1 when the machine halts.

 

  1. Write down the bit pattern (in hexadecimal) at memory address F3 when the Halt instruction is executed.

 

  1. How many times the machine instruction at address EE is executed before the machine halts.

 

  1. Determine the contents of register 0 after the instruction at address EC is executed.

 

  1. Determine the contents of register 2 when the instruction at address F0 is Note: Use the table provided in Appendix C at page 581 of book.

 

 

 

Answer of Q1

 

 

  1. Determine the contents of register 1 when the machine halts.

 

ANS = 15

 

  1. Write down the bit pattern (in hexadecimal) at memory address F3 when the Halt instruction is executed.

 

ANS=0705

  1. How many times the machine instruction at address EE is executed before the machine halts.

ANS = 6

  1. Determine the contents of register 0 after the instruction at address EC is executed.

ANS=00

  1. Determine the contents of register 2 when the instruction at address F0 is

ANS=07

 

 

 

 

Questions No 02                                                                                                                                          Marks (10)

 

 

  1. Perform binary addition on given numbers:

20 161 and 7 14.

 

  1. Convert the following binary number into ASCII code and then into its equivalent decimal representation.

 

01001001010000010100110101011100

 

 

Answer of Q2

 

 

Part (a)

 

2423222120Radix2-12-22-32-4
168421½¼1/81/18
101011010

 

 

Ans== 10101.1010

 

222120Radix2-12-2
421½¼
10110

 

Ans== 101.10

Binary addition

10101.1010

101.10

100101.0010

 

Part (b)

 

2726252423222120Answer
1286432168421
0100100173
0100000165
0100110177
0101110092

 

73 = I

65 = A

77 =M

92 = /

IAM/= 01001001010000010100110101011100  ANS

 

Ascii Table

CS101 ASSIGNMENT 1 SOLUTION 2021

Note: For More Opportunities Follow our Facebook Group, Twitter, LinkedIn, & Telegram Group.

Scholarships 2021-2022

Leave a Comment