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

The following two 16-bit instructions are stored in the memory, give the equival

ID: 3765023 • Letter: T

Question

The following two 16-bit instructions are stored in the memory, give the equivalent four-digit hexadecimal code and explain in your words what it is that the instructions is going to perform The following program is stored in the memory unit of this computer. Show the content of AC, PC, and IR, at the end after each instruction is executed. Assume that the adder cannot perform subtraction directly. The subtraction must be done using the 2's complement of the subtrahend by complementing and incrementing AC. Give the complete sequence of register transfer statement needed to execute the SUB instruction starting from T_4?

Explanation / Answer

1-

a. 0001 0000 0010 0100

If we change in four digit hexa decimal code

0001 - 1

0000 - 0

0010 - 2

0100 - 4

0001 0000 0010 0100 - 1024

direct ADD: AC <- M[AR] + AC ; Address = 24

b. 1011 0001 0010 0100

1011 - B

0001 - 1

0010 - 2

0100 - 4

1011 0001 0010 0100 - B124

indirect STA: AR<-M[AR]

M[AR] <- AC ; Address is found at address 124.

e)

(C1A5)16 = 1100 0001 1010 0101

(8184)16 = 1000 0001 1000 0100

Problem 2:

SUB D2 T4 DR <- M[AR]
       D2 T5 DR <- AC,AC <- DR
       D2 T6 AC <- AC’
   D2 T7 AC <- AC + 1
   D2 T8 AC <- AC+DR , SC <- 0

Location Instruction AC PC IR 010 CLA 0000 011 7800 011 ADD 016 C1A5 012 1016 012 BUN 014 C1A5 014 4014 013 HLT 8184 014 7001 014 AND 017 8184 015 0017
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