Building the ALU

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing the lecture notes on Building the ALU in Digital Systems.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

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.

2
New cards

What facilities does the ALU provide?

Registers (working storage for operands and results) and status flags (overflow, zero, and negative).

3
New cards

What does the Overflow flag indicate?

It tells us if the previous arithmetic instruction resulted in an overflow.

4
New cards

What are the inputs and outputs of a half adder?

A and B inputs, Sum (S), and Carry (C).

5
New cards

How are the CARRY and SUM calculated in a half adder?

CARRY = AB and SUM = A XOR B

6
New cards

What is a full adder?

It adds three bits: two input bits plus a possible carry from the previous stage.

7
New cards

How is a full adder constructed?

Two half adders are used to add the 3 bits.

8
New cards

Why are ripple-carry adders slow?

Ripple-carry adders are slow because each stage must wait for the carry bit from the previous stage.

9
New cards

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.

10
New cards

Besides addition, what other operation can be performed with 2's complement arithmetic in ALU?

Subtraction allow us to do comparisons:

11
New cards

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.

12
New cards

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.

13
New cards

What are the main types of bit shifts?

Arithmetic shift, logical shift, rotate, and rotate through carry.

14
New cards

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.