Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Arithmetic / Logic Instruction The instruction format of the machine ( except LOAD, STORE and BRANCH ) : Opcode Source Source Destination Operand 1 Operand
ArithmeticLogic Instruction
The instruction format of the machine except LOAD, STORE and BRANCH:
Opcode Source Source Destination
Operand Operand Operand
The instructions can be categorized into the following types:
Arithmetic Operations
ADD R R R ; R R R
SUB R R R ; R R R
Logical Operations
AND R R R ; R R and R
OR R R R ; R R or R
NOT R R ; R not R
Data Movement Instruction
MOV R R ; R R
Note that in the NOT and MOV operation, source operand field is not used and will be
set as
LoadStore Instruction
Moving data from Memory to registers and vice versa.
LD A R ; R A A is in memory
ST R A ; A R A is in memory
Load instruction:
Opcode Addressing Destination
Load Mode Operand
Store instruction:
Opcode Source Addressing Store Operand Mode
where the addressing mode how to find the target address is specified in byte of the
instruction. In this machine, only one addressing mode is used, where the target address
is given by the word following the LOAD or STORE instruction Absolute Addressing This
is specified as in that byte.
Control Instruction
Control flow is by using BRANCH instruction. There are two types of branch instruction
conditional and unconditional Branch. Branch Instruction Format:
Opcode Condition Addressing Branch Code cc Mode
Conditional branch is based on the result of previous ALU operation, which is store in
a flag register. In this machine, we only use a ZERO flag, which will be set to if the
ALU operation results in and set to otherwise. The target address is specified in
the same way as in memory operation. Similarly, the byte of Addressing Mode is set to
The condition code is specified as
Condiation Code cc Instruction Description
BR Unconditaion Branch, always goto
BZ Branch if Zero flag is set
BNZ Branch if Zero flag is NOT set
Halt Instruction
The HLT instruction is used to stop the program. The other bytes are all
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started