← Circuits with Tinkercad

Chapter 10 · Book pp. 135–152

Applied Digital Circuits 4: the Binary Adder IC

เรียน-เล่น-รู้ กับวงจรดิจิทัลขั้นประยุกต์ 4 - ไอซีวงจรบวกเลขฐานสอง

A binary adder adds binary numbers. It is part of the ALU (Arithmetic Logic Unit) in a microprocessor, along with the control unit, and of every digital system that needs to calculate — calculators and digital clocks, for example.

10.1 Basic binary adders ประเภทของวงจรบวกเลขฐานสอง

10.1.1 Half adder (no carry in)

A half adder adds two bits: inputs A and B, outputs sum (X) and carry (Cout). 0+0 = 0, 0+1 = 1, 1+0 = 1, 1+1 = 0 carry 1.

InputsOutputs
ABSum XCarry Cout
0000
0110
1010
1101

X = AB + AB = A ⊕ B

Cout = AB

So a half adder is an exclusive-OR (XOR) gate for the sum and an AND gate for the carry:

Fig 10-1Logic circuit of a 1-bit half adder: built from NOT, AND and OR gates (left), simplified to an XOR for SUM and an AND for CARRY (right)

10.1.2 Full adder (with carry in)

A full adder adds 3 bits: A, B and the carry in (Cin) from the column before. It gives the sum of A + B + Cin and a carry out, Cout.

ABCinSum XCout
00000
00110
01010
01101
10010
10101
11001
11111

X = ABC + ABC + ABC + ABC

Cout = ABC + ABC + ABC + ABC, which simplifies to Cout = AB + ABC + ABC

Fig 10-2Logic circuit of a 1-bit full adder, from the logic equations: inputs A, B and Ci; outputs SUM (X) and CARRY (Cout)

Next: build a 1-bit adder →

10.2 A 1-bit adder from basic logic ICs วงจรบวก 1 บิตจากไอซีลอจิก

10.2.1 The circuit

The simplest binary adder uses two ICs: the 74HC86 and the 74HC08. The XOR gate adds inputs A and B and gives the sum S; the AND gate gives the carry when both inputs are “1”, out on Cout.

Fig 10-3A 1-bit binary adder from basic logic gate ICs: IC1 74HC86 (XOR) drives LED1 (SUM = X); IC2 74HC08 (AND) drives LED2 (Cout). R1 and R2 10k pull-downs

10.2.2 Testing the 1-bit adder

🛠️ Lab 10.1 · Add two bits

  1. Build Fig 10-4 in Tinkercad, as in Fig 10-5.
  2. Set inputs A and B with DIP switch SW1 (positions 3 and 4) and watch the two output LEDs, X and Cout.
  3. Build it with real parts and repeat step 2.

In this circuit, sliding a switch ON gives logic “1” and OFF gives “0”. It is the simplest way to see how binary addition works.

Fig 10-4The 1-bit adder test circuit using basic logic gate ICs (SW1 DATA: ON = 1, OFF = 0)
Fig 10-5The 1-bit adder from logic gate ICs on Tinkercad. Set inputs A and B with DIP switch positions 3 and 4

Next: the 74HC283 →

10.3 The 74HC283 4-bit adder IC ไอซีวงจรบวก 4 บิต

The 74HC283 holds four full adders working together as a 4-bit binary adder, with a carry output so you can chain more adders.

StageInputsSum out
1A1 (pin 5), B1 (pin 6)S1 (pin 4)
2A2 (pin 3), B2 (pin 2)S2 (pin 1)
3A3 (pin 14), B3 (pin 15)S3 (pin 13)
4A4 (pin 12), B4 (pin 11)S4 (pin 10)
Cin (pin 7) — carry in from a previous adder · Cout (pin 9) — carry out to the next · Vcc (pin 16) 2–6 V · GND (pin 8)
Fig 10-674HC283 pinout, block diagram and example: Example 1 — 10 + 9 with no carry in (Cin = 0): 0 + 1010 + 1001 = 19 = 10011, so Cout = 1. Example 2 — 10 + 9 with carry in (Cin = 1): 1 + 1010 + 1001 = 20 = 10100, Cout = 1

Worked examples (Fig 10-6)

  1. Cin = 0: 0 + 1010 + 1001 = 19 = 1 0011 → Cout = 1, S4–S1 = 0011.
  2. Cin = 1: 1 + 1010 + 1001 = 20 = 1 0100 → Cout = 1, S4–S1 = 0100.

Each stage adds its A, B and the carry from the stage before; its carry goes on to the next stage.

Next: testing the 74HC283 →

10.4 Testing the 74HC283 ทดลองใช้งานไอซี 74HC283

Fig 10-7 tests the 74HC283 as a 4-bit adder with no carry in. Two 4-way DIP switches, SW1 and SW2, set the 4-bit numbers A and B. ON sends “1” into the IC; OFF (not connected) sends “0”. The IC adds them at once and shows the sum on S1–S4 with LED1–LED4, and the carry on Cout with LED5.

Fig 10-7A 4-bit binary adder using the 74HC283: SW1 DATA A, SW2 DATA B, 8 × 10k pull-downs, red LEDs for S1–S4 and a green LED for Cout

🛠️ Lab 10.2 · Add two 4-bit numbers

  1. Build Fig 10-7 in Tinkercad, as in Fig 10-8. Set both 4-way DIP switches to choose two binary numbers to add, and watch the 5 LEDs: 4 red for the sum and 1 green for the carry.
  2. Build it with real parts and repeat step 1. Remember ON = “1”. Make a table like Fig 10-9: fill in A and B, simulate in Tinkercad, and compare with the real circuit. If they don’t match, check your wiring.
Fig 10-8Testing the 74HC283 (or 74LS283) 4-bit adder on Tinkercad by simulation
Fig 10-9Table for entering data to test the 74HC283 4-bit adder: four tries with SW2-B and SW1-A, and LED outputs Cout, S4, S3, S2, S1 to fill in

Practice · Fig 10-9

Work out each row, then check with Tinkercad. Open an answer when you are done.

TryB4 B3 B2 B1A4 A3 A2 A1Your Cout S4 S3 S2 S1
110000111_ _ _ _ _
200111010_ _ _ _ _
301011101_ _ _ _ _
411101111_ _ _ _ _
Answer 1

1000 (8) + 0111 (7) = 15 → Cout = 0, S4–S1 = 1111

Answer 2

0011 (3) + 1010 (10) = 13 → Cout = 0, S4–S1 = 1101

Answer 3

0101 (5) + 1101 (13) = 18 → Cout = 1, S4–S1 = 0010

Answer 4

1110 (14) + 1111 (15) = 29 → Cout = 1, S4–S1 = 1101

➕ Try it: a 4-bit adder

A
B
CoutS4S3S2S1

Next: show it on a 7-segment display →

10.5 A 4-bit adder with a 7-segment display แสดงผลด้วย LED ตัวเลข 7 ส่วน

Five LEDs — four for the sum and one for the carry — show the answer in binary. To make it easier to read, add the CD4511 decoder from Chapter 9 and a 7-segment LED (Fig 10-10).

Fig 10-10A 4-bit binary adder showing its result on a 7-segment LED: IC1 74HC283, IC2 CD4511, a common-cathode display, and LED1 for Cout

🛠️ Lab 10.3 · Add and display

  1. Build Fig 10-10 in Tinkercad, as in Fig 10-11, using one more 400-point breadboard.
  2. Set both 4-way DIP switches to choose the two numbers, and watch the 7-segment display and the green carry LED. ON = “1”. Make a table first, as in 10.4 (Fig 10-12).
Fig 10-11Testing the 74HC283 (or 74LS283) adder with the BCD to 7-segment decoder on Tinkercad by simulation. Scan the QR code to see the simulation results
Fig 10-12Table for entering data to test the 74HC283 adder with a 7-segment display output

Practice · Fig 10-12

Same inputs as Fig 10-9. What will the display and the carry LED show? Remember the CD4511 only shows 0–9.

Answer 1

Sum bits 1111 → display blank (15 is above 9); Cout LED off

Answer 2

Sum bits 1101 → display blank (13 is above 9); Cout LED off

Answer 3

Sum bits 0010 → display 2; Cout LED on

Answer 4

Sum bits 1101 → display blank (13 is above 9); Cout LED on

Chapters 7 to 10 introduced digital circuits with Tinkercad, a key tool for building and simulating circuits, together with the basics from Chapters 1 to 3 on semiconductors and the analogue projects. That covers the essentials for beginners, ready for more advanced learning and many more uses.

Next: review →

Adders at a glance

CircuitInputsOutputsBuilt from
Half adderA, BX = A ⊕ B, Cout = ABXOR + AND (74HC86 + 74HC08)
Full adderA, B, CinX, CoutGates, or one stage of the 74HC283
4-bit adderA1–A4, B1–B4, CinS1–S4, Cout74HC283
Adder + displayAs aboveDigit 0–9 + carry LED74HC283 + CD4511

Breadboard notes

The book ends with blank “Breadboard note” pages for planning a layout before you build. Print this and draw your parts and wires on it.

Breadboard noteA blank breadboard note page: write the project name and date, then sketch your circuit layout

🛠️ Activity · Beyond 4 bits

  1. On paper, add 0110 + 0111 one column at a time, writing each carry. Check with the widget.
  2. In the 1-bit adder (Fig 10-4), add a third input as Cin. Which extra gates do you need to make a full adder (Fig 10-2)?
  3. Chain two 74HC283s (Cout of the first to Cin of the second) to make an 8-bit adder. How big a sum can it show?
  4. In 10.5 the display goes blank for sums 10–15. How could you show a carry-correct decimal answer? (Hint: look up “BCD adder”.)

Check yourself

The practice rows above are the book’s own (Figs 10-9 and 10-12, answers worked by me). These extra questions are my own, based on its pages.

1. In binary, what is 1 + 1?
2. Which gates make a half adder?
3. What does a full adder add that a half adder cannot?
4. In a full adder, A = 1, B = 0, Cin = 1. What are X and Cout?
5. Which two ICs build the 1-bit adder in 10.2?
6. With the 74HC283, Cin = 0, A = 1010 (10) and B = 1001 (9). What is the result?
7. What does Cout of the 74HC283 let you do?
8. In 10.5, the sum is 1101 (13). What does the CD4511 display show?