CS101 Assignment 1 Solution spring 2021 – The Only 100% correct Solution

cs101 assignment 1 solution spring 2021

CS101 Assignment 1 Solution spring 2021 – The Only 100% correct Solution. Data Manipulation: CPU Architecture Philosophies to apply the stored program concept, CPUs are designed to recognize instructions encoded as bit patterns.
This collection of instructions along with the encoding system is called the machine language. An instruction expressed in this language is called a machine level instruction or, more commonly, a machine instruction. The list of machine instructions that a typical CPU must be able to decode and execute is quite short. In fact, once a machine can perform certain elementary but well-chosen tasks, adding more features does not increase the machine’s theoretical capabilities. In other words, beyond a certain point, additional features may increase such things as convenience but add nothing to the machine’s fundamental capabilities.

Introduction to Computing
(CS101)
Assignment # 01
Spring 2021
Total marks = 20
24 May 2021

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.

E2 – 1 5 F2 – F2
E4 – 1 2 F4 –F4
E6 – 5 1 15 – 08
E8 – 3 1 F3 -> 08
EA – 5 0 03 -> 03
EC – B 1 F0 -> No jump
EE – 9 1 21 -> FC
EF – C 0 00 — Halt
……. ONE INSTUCNTION..
1 -> OPCODE-
5 -> REGISTAR NO
F2 -> VALUE OR REGISTER

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

FC


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

08


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

06


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

03


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

F4

Question No 2

01001001   01000001   01001101    01011100

73                  65

1286432168421Decimal
0100000164+1 = 65
0100100164+8+1=73

Author: Habibullah Qamar

Its me Habib Ullah Qamar working as a Lecturer (Computer Sciences) in Pakistan. I have an MS(M.Phil) degree in computer sciences with specialization in software engineering from Virtual University of Pakistan Lahore. I have an experience of more than 15 years in the filed of Computer Science as a teacher. Blog Writing is my passion. I have many blogs, This one is special made with the aim of providing 100% Free online coaching and training to the students of under-graduate and postgraduate classes. Most of the students enrolled in computer sciences, information technology, software engineering and related disciplines find it difficult to understand core concepts of programming and office automation. They find difficult in understanding and solving their assignments.