Digital Logic Design · Lab 3 · read before the labAll labsGo to the lab →

Adding numbers one bit at a time.

A computer adds with a chain of tiny circuits, one per bit. Build them from gates, then use four of them in one chip.

01

Binary addition

Adding two bits has four cases: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 and 1 + 1 = 10, which is 0 with a carry of 1 into the next column. Every column after the first must also add the carry that came in.

Carry in0000
A
B
S = A + B1111

9 + 6 = 15. Carry out 0.

02

Half adder

SumS = A'B + AB' = A ⊕ BXOR gate, 7486
CarryCout = A . BAND gate, 7408

It adds two bits but has no input for a carry from a lower column, so it only works for the first column. That is why it is called a half adder.

03

Full adder

SumS = A ⊕ B ⊕ Cintwo XOR gates
CarryCout = (A ⊕ B) Cin + A . Btwo AND gates and an OR gate

Two half adders in a row: the first adds A and B, the second adds that sum to Cin. A carry comes from either half adder, so an OR gate joins the two carries.

04

Four bits in a row

4 full adders

Each Cout feeds the next Cin. The first Cin is 0 (wired to GND).

ripple

The carry ripples from bit 0 to bit 3; the last Cout is the fifth bit of the sum.

9 + 9 = 18

10010 in binary: the 74283 shows 0010 on the sum LEDs and 1 on Cout.

05

The 74283

742834-bit binary full adder1S12B13A14S05A06B07Cin8GND9Cout10S311B312A313S214A215B216VCC

Hold the chip with its notch on the left. Pin 1 is at the bottom left, the pins count up to the right, then continue along the top from right to left. Most 14 pin chips have VCC on pin 14 and GND on pin 7, but not all: check every new chip.

The 74283 has VCC on pin 16 and GND on pin 8. Its pins are not in order: A0 is pin 5, A1 pin 3, A2 pin 14 and A3 pin 12. Wire from the pin diagram, not by guessing.

06

Check yourself

Q1What do S and Cout of a half adder give for A = 1, B = 1?

S = 0 and Cout = 1 (1 + 1 = 10).

Q2Why does a full adder need an OR gate?

A carry can come from the first half adder or from the second; the OR passes either.

Q3Which pin of the 74283 is Cin and where does it go in Task 3?

Pin 7, wired to GND so the first carry is 0.

Q4What do the LEDs show for 9 + 8?

Cout = 1 and S3 S2 S1 S0 = 0001: 10001 = 17.

I am ready, go to the lab →