1/13
Flashcards for reviewing the lecture notes on Building the ALU in Digital Systems.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the role of the ALU?
Implements arithmetic and logic operations such as add, subtract, multiply, divide, shift of integers, and, or, not, xor, and comparisons.
What facilities does the ALU provide?
Registers (working storage for operands and results) and status flags (overflow, zero, and negative).
What does the Overflow flag indicate?
It tells us if the previous arithmetic instruction resulted in an overflow.
What are the inputs and outputs of a half adder?
A and B inputs, Sum (S), and Carry (C).
How are the CARRY and SUM calculated in a half adder?
CARRY = AB and SUM = A XOR B
What is a full adder?
It adds three bits: two input bits plus a possible carry from the previous stage.
How is a full adder constructed?
Two half adders are used to add the 3 bits.
Why are ripple-carry adders slow?
Ripple-carry adders are slow because each stage must wait for the carry bit from the previous stage.
How do carry-select adders work?
Split the problem: add the “lower” n/2 bits and the “upper” n/2 bits independently, and for the upper n/2 bits, use two sets of full adders: one set assumes Carry-in (Cin) = 0, the other assumes Cin = 1.
Besides addition, what other operation can be performed with 2's complement arithmetic in ALU?
Subtraction allow us to do comparisons:
What are status flags and what register are they stored in?
Bits organized into a special register that reflects an aspect of the outcome of the most recent ALU operation.
How is the overflow flag determined?
If the sign bits are the same but the result has a different sign, we have an arithmetic overflow error.
What are the main types of bit shifts?
Arithmetic shift, logical shift, rotate, and rotate through carry.
What is the purpose of bit shifting?
Enables simple multiplication/division by powers of two, and can also speed up addition-based methods of multiplication.