CS101A – Solved

$ 20.99
Category:

Description

Assignment10
1. [3 pts] List the three groups of a machine’s instructions and give a specific example of instruction of each group.

Using the machine language in Appendix C of the textbook1, answer the following questions.
2. [2 pts] For the following instructions, try to compute how many different instruction instances can each instruction pattern of the machine have.
(a) Op-code = 2
(b) Op-code = 4
(c) Op-code = A
(d) Op-code = C
3. [2 pts] Translate the following instruction from English into the machine language. (Answer in hexadecimal format)
(a) STORE the bit pattern found in register 2 in the memory cell whose address is
10.
(b) JUMP to the instruction located in the memory cell at address DE if the bit pattern in register C is equal to the bit pattern in register number 0. Otherwise, continue with the normal sequence of execution.
4. [3 pts, 0.5 pts for each instruction] The purpose of the following program is to calculate the result of 1+3+5+7+9 and save it to the register 1, and eventually, the program will halt execution. Assume that the machine is started with its program counter containing A4. Please fill in the blank.

1 J.G.Brookshear, “Computer Science: An Overview,” Addison-Wesley, 2011(11th Edition)

A4 2 0 _ _
A6 2 1 _ _
A8 2 2 0 1
AA 2 3 0 2
AC 2 4 0 0
AE 2 5 0 1
B0 5 1 _ _
B2 5 2 2 3
B4 5 4 _ _
B6 B 4 _ _
B8 _ _ _ _ BA C 0 0 0

Reviews

There are no reviews yet.

Be the first to review “CS101A – Solved”

Your email address will not be published. Required fields are marked *