Adder: Difference between revisions

From Rice Wiki
No edit summary
No edit summary
Line 7: Line 7:


Full adders can be constructed with two half adders.
Full adders can be constructed with two half adders.
= Subtraction =
The adder circuit can be used for subtraction without many changes. Simply negate the subtracted input, add a carry-in, and perform addition.
The principle behind this is [[two's complement]].


= Ripple carry adder =
= Ripple carry adder =
A '''ripple carry adder''' is constructed with multiple full adders to compute multi-digit addition. Each full adder contributes some propagation delay due to the need to input carry to the next full adder.
A '''ripple carry adder''' is constructed with multiple full adders to compute multi-digit addition. Each full adder contributes some propagation delay due to the need to input carry to the next full adder.
[[Category:Computer Architecture]][[Category:ECS154A Midterm]]
[[Category:Computer Architecture]][[Category:ECS154A Midterm]]

Revision as of 19:51, 9 May 2024

The adder circuit is the fundamental instruction of many arithmetic operations (such as subtract, multiply, divide, and modulo).

Half and full adder

ADD takes in two binary digits. It then outputs the result, which consists of a digit and a carry.

In contrast to the above, which is a half adder, a full adder has an additional input: carry-in, which modifies the result.

Full adders can be constructed with two half adders.

Subtraction

The adder circuit can be used for subtraction without many changes. Simply negate the subtracted input, add a carry-in, and perform addition.

The principle behind this is two's complement.

Ripple carry adder

A ripple carry adder is constructed with multiple full adders to compute multi-digit addition. Each full adder contributes some propagation delay due to the need to input carry to the next full adder.