In the example instruction ADD R1, #5, what addressing mode supplies the value 5?
4 Machine Instructions Online Quiz Questions
Use this free practice quiz with 20 questions to review 4 Machine Instructions, test your knowledge, and prepare for your next test or exam.
The arrangement that divides an instruction's bits into fields such as an opcode and register fields is its .
Every machine instruction must read an operand from data memory before it can execute.
- A
True
- B
False
Which statements correctly describe common instruction-format fields? Select all that apply.
- A
An opcode identifies the operation the instruction requests.
- B
Register fields identify registers used as sources or destinations.
- C
The opcode always specifies the exact memory address of every operand.
- D
An operand or address field may provide a value, an address, or information used to calculate an address.
A load instruction uses a register's contents as the memory address from which to read its operand. What addressing mode is this?
Which register identifies the address of the next instruction to be fetched?
An ISA uses instructions with different lengths. What determines how far the PC advances when an instruction is fetched?
- A
It always advances by one byte, regardless of the instruction.
- B
It advances only after the instruction has been written back.
- C
Its advancement depends on the ISA and the instruction's length.
- D
It advances by the number of registers named in the instruction.
Which actions may occur while the CPU executes an instruction, depending on that instruction? Select all that apply.
- A
The CPU may perform an arithmetic or logical operation.
- B
The CPU must write a result to both a register and memory.
- C
The CPU may read from or write to memory.
- D
The CPU may make a control-flow decision.
During the fetch step, the CPU reads the instruction from memory into the .
When a conditional branch's condition is satisfied, does the CPU change the program counter to follow the branch?
- A
True
- B
False
Compare PC-relative addressing with base-plus-offset addressing. For each, explain what is used as the reference point to calculate the address and give a typical use.
A processor can overlap instruction stages using a pipeline while still preserving the program's defined results.
- A
True
- B
False
In the example notation 8(R3), what memory location does the operand refer to?
- A
The address held in R3
- B
The address eight units above the address held in R3
- C
The value stored directly in R3
- D
The address of the next instruction
A processor's documentation defines its supported instructions, their meanings, and how their bits are organized. What does this describe?
- A
The register that holds the instruction being decoded
- B
The memory address calculated by an addressing mode
- C
The specification of supported instructions, their meanings, and their bit organization
- D
The circuitry that performs arithmetic operations
Which instruction field identifies the operation the processor is being asked to perform?
- A
A register field
- B
An opcode
- C
An address field
- D
A control field
In the illustrative instruction ADD R1, #5, where does the operand value 5 come from?
- A
The value 5 is part of the instruction.
- B
The value 5 is stored in R1.
- C
The value 5 is stored at a memory address named in the instruction.
- D
The value 5 is calculated from the program counter.
If R3 contains address 1000, an instruction that accesses its operand through (R3) obtains the operand from where?
- A
The operand is the value stored in R3.
- B
The instruction contains the operand's memory address directly.
- C
The operand is stored in memory at the address held in R3.
- D
The operand is stored at an address calculated from the PC.
What is the defining feature of PC-relative addressing for a branch target?
- A
The target is always a fixed absolute address encoded in full.
- B
The target is calculated relative to the PC, often using a signed offset.
- C
The target is the memory address stored in a general-purpose register.
- D
The target is the operand value embedded in the instruction.
R3 contains address 1000. In the illustrative notation 8(R3), what is the effective address? Enter the base-10 integer address with no units.
An instruction specifies memory address 2400, and the operand is stored at that address. Which addressing mode is being used?