ECE 274 - Digital Logic Digital Design: Lecture 9 - Adders
ECE 274 - Digital Logic Digital Design: Lecture 9 - Adders
Functional Requirements:
Lecture 9 - Adders Design a circuit that will add two 2-bit binary numbers
Half-adders Input: A1A0, B1B0
Full-adders Output: S1S0: sum of inputs
C: carry bit
Carry-ripple Adder
1 2
a15a14a13a12a11a10a9a8a7a6a5a4a3a2a1a0b15b14b13b12b11b10b9b8b7b6b5b4b3b2b1b0 s15s14s13s12s11s10s9s8s7s6s5s4s3s2s1s0 c
000000000000000000000000000000 0000000000000000
…. ….
3 4
5 6
Digital Design Digital Design
Datapath Components: Adders: Carry-Ripple Datapath Components: Adders: Carry-Ripple
C2 C1 C0
A3 A2 A1 A0
B3 B2 B1 B0
S3 S2 S1 S0
7 8
2) Convert to Equations
9 10
Functional Requirements:
Design a circuit that will add three bits
Input: A, B, Cin
Output: S: sum of inputs
3) Create the Circuit
C: carry bit
co = ab
s = a’b + ab’ = a xor b
11 12
Digital Design Digital Design
Datapath Components: Adders: Carry-Ripple: Full Adder Datapath Components: Adders: Carry-Ripple: Full Adder
Input: A, B, Cin
Output: S: sum of inputs 2) Convert to Equations
1) Capture the Function
C: carry bit
co = bc + ac + ab
s = a xor b xor c
13 14
co = bc + ac + ab
.3ns .3ns .3ns
s = a xor b xor c .8ns
.6ns
4-bit Adder:
Inputs (9-bits): a3a2a1a0, b3b2b1b0, cin
Outputs (5-bits): c0, s3s2s1s0
17 18
Digital Design Digital Design
Datapath Components: Adders: Carry-Ripple Datapath Components: Adders: Compensating Scale
19 20
Functional Requirements:
Design a circuit that will weigh an object, and add an
adjustment from a user Adjustment
Input: 8-bit Weight Reported by Sensor Knob
3-bit User Adjustment
Output: S7..0: sum of inputs
21 22
23 24
Digital Design Digital Design
Datapath Components: Adders Datapath Components: Adders
8-bit DIP switch based adding calculator. The addition 2+3=5 is shown.
25 26
Digital Design
Datapath Components: Adders
8-bit DIP switch-based adding calculator, using a register to block spurious LED outputs.
The LEDs only get updated after the button is pressed, which loads the output register.
27