πŸŽ“ BookMCQ
← Back to 2. Simple as Possible (SAP) - I

πŸ“ Instruction Register of Simple as Possible (SAP) I Computer (8 MCQs)

Eight-Bit Instruction Storage and Opcode Organization

The instruction register is an 8-bit register that holds the machine instruction currently being decoded or executed in the SAP-I computer. Each instruction contains a 4-bit opcode in its upper half and a 4-bit address field in its lower half. The opcode identifies the required operation, while the address field identifies an operand location for instructions that access memory.

Separation of Opcode and Memory Address Fields

The upper four bits of the instruction register connect to the controller's instruction-decoding circuitry. The lower four bits provide the memory address required by LDA, ADD and SUB. This division allows a single 8-bit instruction to identify both an operation and one of the sixteen available RAM locations without requiring a separate instruction word.

Loading the Instruction Register During Fetching

During the second principal fetch timing step, RAM places its selected 8-bit instruction onto the common bus. The II control signal enables the instruction register to capture the complete word. The controller subsequently examines its opcode, while the address field remains available for selecting the operand when the instruction requires memory access.

Example of Opcode and Address Interpretation

Consider an LDA instruction whose lower address field is 0EH. The instruction register stores the complete 8-bit machine word, with the LDA opcode in its upper nibble and 1110 in its lower nibble. After decoding, the controller uses the lower nibble to select RAM location 0EH through the MAR.

Relationship Between the Instruction Register and Controller

The instruction register provides the information needed by the controller to generate the correct execution signals. Its opcode determines whether memory data must be loaded, arithmetic performed, output transferred or processing halted. The lower field supplies an operand address where necessary. This interaction separates instruction storage from instruction interpretation and execution.

Instruction Register Misconceptions and Corrections

'The instruction register stores only the opcode' is incorrect because it retains the complete 8-bit instruction. 'The lower four bits always contain numerical data' overlooks their role as a memory address field in memory-referencing instructions. 'The instruction register automatically increments the program counter' is incorrect because counter advancement is controlled separately by CE.

Instruction Format and Register-Transfer Questions

Practise identifying the two four-bit instruction fields and explaining their purposes. Trace the transfer of a fetched RAM word into the IR and distinguish opcode decoding from operand addressing. Examination questions may present an instruction in binary or hexadecimal form and ask students to identify its operation, address field or relationship with the controller.

Instruction Storage and Decoding Terms

  • IR - Holds the current eight-bit instruction.
  • II - Enables instruction register input.
  • Opcode - Identifies the instruction operation.
  • Address Field - Identifies an operand location.
  • Nibble - Four-bit group of binary data.
  • Decoder - Interprets the opcode bits.
1
Easy
4
Medium
3
Hard

πŸ“ All Instruction Register of Simple as Possible (SAP) I Computer MCQs

Q1. What is stored in the Instruction Register (IR) of a CPU after the fetch phase?

A.The next memory address to be accessed
B.The current instruction fetched from memory βœ…
C.The result of the last ALU operation
D.The status flags of the CPU
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: The IR holds the exact binary representation of the instruction that has just been fetched from main memory. Option B states this directly, making it correct. Option A describes the Program Counter, not the IR. Option C refers to the ALU result, which is stored in a separate register. Option D mentions status flags, which reside in the flag register. Understanding that the IR’s purpose is to provide the current instruction helps students see how the fetch‑decode‑execute cycle proceeds.

Q2. Why does the control unit rely on the opcode portion of the instruction held in the IR to generate appropriate control signals?

A.Because the opcode contains the memory address of the next instruction
B.Because the opcode specifies the operation type the ALU must perform βœ…
C.Because the opcode holds the data values for arithmetic
D.Because the opcode determines the clock speed
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The opcode is the part of an instruction that tells the control unit which operation the ALU must carry out. Option B captures this relationship, so it is correct. Option A confuses the opcode with an address field, which is typically separate. Option C suggests the opcode contains operand data, which is not true. Option D mistakenly links the opcode to clock speed, which is unrelated. Recognizing that the control unit translates the opcode into control signals is essential for designing and debugging instruction execution.

Q3. How does keeping the Instruction Register separate from the Program Counter (PC) help a pipelined processor execute multiple instructions simultaneously?

A.It allows the PC to be incremented while the IR holds the current instruction βœ…
B.It enables the IR to store multiple instructions at once
C.It merges fetch and decode stages into one
D.It eliminates the need for a control unit
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– Explanation: In a pipelined architecture, the fetch stage can increment the PC while the decode stage works with the instruction already held in the IR. Option A describes this overlap, making it correct. Option B incorrectly claims the IR can hold multiple instructions, which it cannot. Option C merges fetch and decode, defeating pipelining benefits. Option D removes the need for a control unit, which is inaccurate. Knowing how separating PC and IR enables parallel processing clarifies why modern CPUs achieve high throughput.

Q4. In a synchronous CPU, what role does the clock pulse play in transferring the fetched instruction into the Instruction Register?

A.It determines the voltage level of the instruction bits
B.It synchronizes the latch that captures the instruction on a rising edge βœ…
C.It encrypts the instruction before storage
D.It directly computes the instruction's opcode
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: Synchronous CPUs use a clock edge to trigger latches that capture data. The IR typically contains an edge‑triggered latch that copies the fetched instruction on the rising (or falling) edge of the clock. Option B correctly describes this mechanism. Option A confuses voltage levels with timing. Option C suggests encryption, which is not part of the fetch process. Option D claims the clock directly computes the opcode, which is false. Understanding clock‑driven latching explains how reliable instruction transfer is achieved.

Q5. A microcontroller executes a loop that increments a counter stored in memory. Which component updates the Instruction Register with the next loop instruction after each iteration?

A.Arithmetic Logic Unit
B.Control Unit βœ…
C.Output Unit
D.Instruction Decoder
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: After each loop iteration, the control unit issues the next fetch signal and loads the newly fetched instruction into the IR. Option B identifies the control unit as the component that orchestrates this transfer. The ALU (Option A) only performs arithmetic, not instruction loading. The Output Unit (Option C) displays results and does not participate in fetching. The Instruction Decoder (Option D) interprets the instruction after it is in the IR, but does not move it there. Recognizing the control unit’s role clarifies the fetch‑decode cycle in loops.

Q6. During testing, a single-bit flip in the IR causes the CPU to perform a subtraction instead of an addition. Which unit is primarily responsible for detecting that the resulting data does not match the expected operation?

A.Control Unit
B.Arithmetic Logic Unit
C.Status Register βœ…
D.Memory Management Unit
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– Explanation: The status register (often called flags register) records condition codes such as overflow, zero, or sign after an ALU operation. When an unexpected subtraction occurs, the status flags will indicate a mismatch with the expected addition, allowing detection. Option C is correct. The control unit (Option A) generates signals but does not monitor result correctness. The ALU (Option B) produces the result but does not flag errors itself. The Memory Management Unit (Option D) handles address translation, unrelated to operation verification. This explanation shows how hardware flags aid debugging.

Q7. A designer wants to add a new 'rotate left' instruction to the ISA. Which modifications are required concerning the Instruction Register and related control logic?

A.Only the IR size must be increased
B.The opcode field in the IR must be defined and the control unit's microcode updated βœ…
C.The ALU must be replaced entirely
D.The Program Counter must be disabled
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: Adding a new instruction requires defining a unique opcode within the IR’s opcode field and updating the control unit’s microcode or control logic to generate the proper signals for the ALU to perform the rotate left operation. Option B captures both steps, making it correct. Option A suggests only increasing IR size, which is insufficient without control logic changes. Option C proposes replacing the entire ALU, which is unnecessary; a rotate can be implemented with existing circuitry. Option D incorrectly advises disabling the PC, which would halt instruction sequencing. Understanding ISA extension processes is key for architecture design.

Q8. When debugging, a programmer observes that the ALU output matches the previous instruction while the IR shows the current instruction. Which likely hardware timing issue caused this misalignment?

A.The clock signal is too fast for the IR latch
B.The IR is not being cleared before loading the new instruction
C.The control unit is sending signals to the ALU before the IR is updated βœ…
D.The memory bus is corrupted
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: If the ALU receives control signals before the IR has been updated with the new instruction, it will still operate on the previous opcode, causing the observed lag. Option C describes this timing error, so it is correct. Option A suggests the clock is too fast, which might cause setup problems but does not specifically explain the misalignment. Option B implies the IR is not cleared, which would not produce the described behavior. Option D blames a corrupted memory bus, which would affect fetching, not the synchronization between IR and ALU. Recognizing pipeline timing dependencies helps locate such bugs.

πŸ”— Related Topics (MCQs)