ALU 101 Instruction Set and Operations 1 — Questions and Answers
Question 1: What is an instruction set architecture (ISA)?
- The physical layout of the ALU chip
- The set of instructions a processor can execute, defining its programming interface (Correct answer)
- The cache organization of the CPU
- The power management system of the CPU
Correct answer: The set of instructions a processor can execute, defining its programming interface
The ISA defines the complete set of machine instructions, registers, addressing modes, and data types that a processor supports.
Question 2: What does an arithmetic shift right operation do to a signed binary number?
- Divides it by 2, preserving the sign bit (Correct answer)
- Multiplies it by 2
- Clears all bits
- Inverts the sign bit
Correct answer: Divides it by 2, preserving the sign bit
An arithmetic shift right shifts bits right and replicates the sign bit into the vacated positions, effectively dividing the signed value by 2.
Question 3: A logical shift left by 1 bit is equivalent to:
- Dividing by 2
- Multiplying by 2 (Correct answer)
- Rotating bits
- Clearing the MSB
Correct answer: Multiplying by 2
A logical left shift by 1 multiplies the unsigned binary value by 2, as each bit position represents twice the value of the position to its right.
Question 4: Which type of instruction tells the ALU to compare two values?
- MOVE
- LOAD
- COMPARE (CMP) (Correct answer)
- STORE
Correct answer: COMPARE (CMP)
A COMPARE (CMP) instruction subtracts two operands and sets the ALU flags without storing the result, allowing conditional decisions.
Question 5: What addressing mode uses the value in a register as the memory address to access?
- Immediate addressing
- Direct addressing
- Register indirect addressing (Correct answer)
- Implied addressing
Correct answer: Register indirect addressing
Register indirect addressing uses the value stored in a register as the effective memory address from which to load or store data.
Question 6: In an RISC architecture, ALU instructions typically operate on:
- Memory operands directly
- Only register operands (Correct answer)
- I/O port values
- Constants stored in ROM
Correct answer: Only register operands
RISC (Reduced Instruction Set Computer) architectures require ALU instructions to use register operands, with separate LOAD/STORE instructions for memory access.
What is an instruction set architecture (ISA)?