Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. [16 marks] Architecture Implementation A computer executes machine-language p

ID: 3664583 • Letter: 2

Question

 2. [16 marks] Architecture Implementation  A computer executes machine-language programs consisting of machine instructions taken from that computer's ISA.  However, to execute each instruction inside the processor requires a sequence of steps, which must be carefully controlled.  Conceptually, this sequence of steps is controlled by a (hard-wired or software) _microprogram_ consisting of _microinstructions_.  A toy computer has some registers, an adder, and a multiplier.  It has three machine instructions: i) 'init' (set all registers to 1), ii) 'add r1,r2,r3' (add the specified registers), and iii) 'mul r1,r2,r3' (multiply the specified registers).  Both functional units require their operands to be placed into their (nonISA) input registers.  Machine instructions are fetched by magic.  a) [8 marks] Could one of these machine instructions be used as one of the microinstructions? ___ (yes/no)  Explain.  b) [8 marks] Invent a (toy) microinstruction and explain how it works. 

Explanation / Answer

a) Yes all three machine instructions i.e,

'init' (set all registers to 1)

'add r1,r2,r3'

'mul r1,r2,r3'

as in these instructions each instruction pertain to a single micro instruction because combining these instructions forms machine instruction.

For example

mov r1 00A

mov r2 00H

mov r3 0AH

add r1 r2

add r1 r3

mul r1 r2

mul r1 r3

init

thus by following the above example we can say that each of the above given machine instructions can be used as micro instructions.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote