Recall & Review
beginner
What does ALU stand for in digital design?
ALU stands for Arithmetic Logic Unit. It performs arithmetic and logic operations inside a CPU.
Click to reveal answer
beginner
Name two main types of operations an ALU performs.
An ALU performs arithmetic operations (like addition, subtraction) and logic operations (like AND, OR, XOR).
Click to reveal answer
intermediate
In VHDL, how do you define a signal to hold the ALU operation code?
You define a signal with a specific bit width, for example: <br>
signal alu_op : std_logic_vector(2 downto 0); <br> This holds the operation code for the ALU.Click to reveal answer
intermediate
What is the role of a 'case' statement in ALU design using VHDL?
The 'case' statement selects which operation the ALU performs based on the operation code signal. It makes the code clear and easy to read.
Click to reveal answer
intermediate
Why is it important to handle overflow in an ALU?
Overflow happens when the result of an arithmetic operation is too big to fit in the output size. Handling it prevents wrong results and helps the CPU know when this happens.
Click to reveal answer
What does the ALU primarily do?
✗ Incorrect
The ALU performs arithmetic and logic operations inside the CPU.
Which VHDL construct is best for selecting ALU operations based on an opcode?
✗ Incorrect
The case statement is ideal for selecting among multiple operation codes clearly.
What is a common bit width for an ALU operation code signal in VHDL?
✗ Incorrect
3 bits can represent up to 8 different operations, which is common for simple ALUs.
Which operation is NOT typically performed by an ALU?
✗ Incorrect
Data storage is handled by memory, not the ALU.
Why do we check for overflow in ALU operations?
✗ Incorrect
Overflow detection helps identify when the result is too large to fit in the output bits.
Explain how a simple ALU can be designed in VHDL using a case statement.
Think about how the ALU chooses what to do based on the opcode.
You got /4 concepts.
Describe why handling overflow is important in ALU design and how it might be detected.
Overflow is like trying to pour too much water into a small cup.
You got /4 concepts.