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.
| Inputs | Outputs | ||
|---|---|---|---|
| A | B | Sum X | Carry Cout |
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
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:
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.
| A | B | Cin | Sum X | Cout |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
X = ABC + ABC + ABC + ABC
Cout = ABC + ABC + ABC + ABC, which simplifies to Cout = AB + ABC + ABC
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.
10.2.2 Testing the 1-bit adder
🛠️ Lab 10.1 · Add two bits
- Build Fig 10-4 in Tinkercad, as in Fig 10-5.
- Set inputs A and B with DIP switch SW1 (positions 3 and 4) and watch the two output LEDs, X and Cout.
- 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.
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.
| Stage | Inputs | Sum out |
|---|---|---|
| 1 | A1 (pin 5), B1 (pin 6) | S1 (pin 4) |
| 2 | A2 (pin 3), B2 (pin 2) | S2 (pin 1) |
| 3 | A3 (pin 14), B3 (pin 15) | S3 (pin 13) |
| 4 | A4 (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) | ||
Worked examples (Fig 10-6)
- Cin = 0: 0 + 1010 + 1001 = 19 = 1 0011 → Cout = 1, S4–S1 = 0011.
- 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.
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.
🛠️ Lab 10.2 · Add two 4-bit numbers
- 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.
- 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.
Practice · Fig 10-9
Work out each row, then check with Tinkercad. Open an answer when you are done.
| Try | B4 B3 B2 B1 | A4 A3 A2 A1 | Your Cout S4 S3 S2 S1 |
|---|---|---|---|
| 1 | 1000 | 0111 | _ _ _ _ _ |
| 2 | 0011 | 1010 | _ _ _ _ _ |
| 3 | 0101 | 1101 | _ _ _ _ _ |
| 4 | 1110 | 1111 | _ _ _ _ _ |
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
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).
🛠️ Lab 10.3 · Add and display
- Build Fig 10-10 in Tinkercad, as in Fig 10-11, using one more 400-point breadboard.
- 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).
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.
Adders at a glance
| Circuit | Inputs | Outputs | Built from |
|---|---|---|---|
| Half adder | A, B | X = A ⊕ B, Cout = AB | XOR + AND (74HC86 + 74HC08) |
| Full adder | A, B, Cin | X, Cout | Gates, or one stage of the 74HC283 |
| 4-bit adder | A1–A4, B1–B4, Cin | S1–S4, Cout | 74HC283 |
| Adder + display | As above | Digit 0–9 + carry LED | 74HC283 + 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.
🛠️ Activity · Beyond 4 bits
- On paper, add 0110 + 0111 one column at a time, writing each carry. Check with the widget.
- 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)?
- 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?
- 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.