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

Given the following table for a simple CPU Operation OP_Code Symbol Add 000 ADD

ID: 3539259 • Letter: G

Question

Given the following table for a simple CPU

Operation

OP_Code

Symbol

Add

000

ADD

Subtract

001

SUB

NAND

010

NND

NOR

011

NOR

LOAD

100

LOD

STORE

101

STR

JUMP

110

JMP

HALT

111

HLT



there are three numbers stored at Locations 20, 21, and 22. Lets name these locations X, Y, and Z. Lets name Location 23, RESULT. Write the assembly-language code to perform the equation: RESULT = X - Y - Z;

Operation

OP_Code

Symbol

Add

000

ADD

Subtract

001

SUB

NAND

010

NND

NOR

011

NOR

LOAD

100

LOD

STORE

101

STR

JUMP

110

JMP

HALT

111

HLT

Explanation / Answer

LOD X ; put X in the working register
SUB Y ; substract Y from the working register

SUB Z ; substract Z from the working register

STR RESULT ; store the value of the working register to RESULT

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