ALU 101 ALU Hardware Components 2 — Questions and Answers
Question 1: What is the role of carry lookahead logic in an ALU?
- To delay carry propagation
- To compute carry bits in parallel rather than sequentially (Correct answer)
- To reset the accumulator
- To convert binary to BCD
Correct answer: To compute carry bits in parallel rather than sequentially
Carry lookahead logic calculates carry signals simultaneously using generate and propagate terms, eliminating ripple delay.
Question 2: Which hardware component stores intermediate values between ALU operations in a typical CPU datapath?
- Program counter
- General-purpose registers (Correct answer)
- Instruction register
- Branch predictor
Correct answer: General-purpose registers
General-purpose registers hold operands and intermediate results so the ALU can quickly access them without accessing main memory.
Question 3: What is a barrel shifter used for in an ALU?
- Generating carry bits
- Performing multi-bit shifts in a single clock cycle (Correct answer)
- Storing overflow results
- Decoding opcodes
Correct answer: Performing multi-bit shifts in a single clock cycle
A barrel shifter uses a network of multiplexers to shift data by an arbitrary number of bit positions in one cycle.
Question 4: In ALU design, what does the term 'bit-sliced' architecture mean?
- The ALU processes only 1-bit operands
- The ALU is built from identical 1-bit sections that can be cascaded (Correct answer)
- The clock is divided into slices
- Memory is partitioned per bit
Correct answer: The ALU is built from identical 1-bit sections that can be cascaded
A bit-sliced ALU consists of identical 1-bit processing units connected in series to handle any desired word width.
Question 5: What is the purpose of an inverter (NOT gate) in an ALU subtraction circuit?
- To amplify signals
- To compute the two's complement negation as part of subtraction (Correct answer)
- To store the sign bit
- To synchronize clock edges
Correct answer: To compute the two's complement negation as part of subtraction
Inverting the subtrahend bits and adding 1 (via carry-in) implements two's complement subtraction using the existing adder hardware.
Question 6: Which ALU component is responsible for detecting when an operation produces a zero result?
- Carry lookahead unit
- Zero detector (NOR tree) (Correct answer)
- Accumulator latch
- Instruction decoder
Correct answer: Zero detector (NOR tree)
A zero detector, typically implemented as a NOR of all output bits, sets the Zero flag when every result bit is 0.
What is the role of carry lookahead logic in an ALU?