Question

3. Lets say that Marie added a new command: inc X that adds 1 to the value stored at memory location X. a. Is there an opcod

all info in picture

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans. a Increment X

org 0

LOAD X /load X into AC

ADD 1 /add 1 to AC

STORE X /store AC in X

Ans b. In this answer instruction fetches data X from memory, after increment it stores it back to memory.

Fetch: MAR<-PC

MBR<-M[MAR] //divides into 2 steps

IR<-MBR

   PC<-PC+1

Decode: Decode IR[15..12] //reversed order of above steps

MAR<-IR[11..0]

Get op: MBR<-M[MAR]

Execute: AC<-MBR+1 //increment X

MBR<-AC // move it back

M[MAR]<-MBR // store it back to x location

Add a comment
Know the answer?
Add Answer to:
all info in picture 3. Let's say that Marie added a new command: inc X that adds 1 to the value stored at memory location X. a. Is there an opcode available for this instruction? If so, what o...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT