No carry at all完全不用進位
No column has two 1s. Watch each block work alone, with nothing passed along.
沒有哪一位同時有兩個 1。看每個方塊各算各的,什麼都不用傳。
How Computers Work · Unit 1 · Lesson 4 · 電腦概論 單元一 第四課
Set two numbers with switches and watch a four-bit adder work in 3D, one column at a time, as the carry hops from right to left. See the two gates inside a half adder, then be the adder yourself.
用開關設好兩個數,在 3D 裡看一台四位元加法器一位一位地算,進位從右邊跳到左邊。看看半加器裡面的兩個閘,再換你自己當加法器。
A few logic gates wired together can add. For one column, an XOR gate gives the sum and an AND gate gives the carry. Put one adder in every column, pass each carry to the column on its left, and the circuit adds whole numbers.
幾個邏輯閘接起來就能做加法。只看一位的話,XOR 閘算出「和」,AND 閘算出「進位」。每一位放一個加法器,把進位傳給左邊那一位,整個電路就能把兩個數加起來。
3D Model · 3D 模型
The two back rows are the numbers A and B: tap their switches to set them. The front row is the answer. Each block marked + adds one column: a bit of A, a bit of B, and the carry from the block on its right. The answer changes the moment you flip a switch. Press Watch it add to clear the answer and see it worked out one column at a time, from right to left.
後面兩排是 A 和 B 兩個數:點它們的開關來設定。最前面一排是答案。每個標著「+」的方塊負責一位:A 的一個位元、B 的一個位元,加上右邊方塊傳過來的進位。你一撥開關,答案馬上跟著變。按「看它怎麼加」,答案會先清掉,再由右往左一位一位算給你看。
Reading · 英文閱讀
Lesson 3 ended with a promise: logic gates, which only answer yes or no, can add. That sounds odd. AND, OR, and NOT know nothing about numbers. But Lesson 1 showed that a number is only a row of switches, and adding is a job you can do one column at a time. If gates can handle one column, a row of them can handle the whole sum.
Start with the smallest problem: add two bits. There are only four cases. 0 + 0 is 0, 0 + 1 is 1, 1 + 0 is 1, and 1 + 1 is two, which in binary is written 10: write 0 and carry 1. Now look at what you write down in each case: 0, 1, 1, 0. That is the table for XOR. Look at the carry: 0, 0, 0, 1. That is the table for AND. So one XOR gate and one AND gate, side by side, add two bits. This small circuit is called a half adder.
A half adder is enough for the column on the far right. Every other column has a third number to add: the carry coming in from its right. A circuit that adds three bits is called a full adder. It can be built from two half adders and an OR gate. Its hardest case is 1 + 1 + 1, which is three, written 11 in binary: write 1 and carry 1.
Now give every column its own full adder, and connect each carry out to the carry in of the column on its left. That is a complete adding machine. Try 0111 + 0001 in the model. The right column makes a carry, the next column passes it on, and so does the next, until it lands in the fourth column: 1000. This is the same falling-domino carry you saw in Lesson 1. Because the carry ripples along, engineers call this a ripple-carry adder.
People built adding machines long before electronics. About 1642, the French mathematician Blaise Pascal designed one that added by turning wheels, to help his father, a tax collector. Nearly three hundred years later, George Stibitz of Bell Laboratories took two telephone relays, which are switches worked by electricity, some flashlight bulbs, and strips cut from a tobacco can, and made a circuit that added two binary digits. He built it at home on his kitchen table, so it became known as the Model K.
The adder inside a processor today works on many more bits at once than our four: 16, 32, or 64, depending on the computer. Its designers also use clever circuits that work out the carries ahead of time, so the answer does not have to wait for a long ripple. The idea has not changed. This is also the end of Unit 1. You started with one switch, on or off. A row of switches became a number. Codes turned numbers into words, pictures, and sound. Gates answered questions, and now gates add. Everything else a computer does is built from these few ideas.
Questions · 閱讀理解
Which two gates make a half adder, and what does each one give?
Why does every column except the rightmost need a full adder instead of a half adder?
What happens when you add 0111 and 0001, and why is it called a ripple?
Words & Phrases · 生字及片語
Quick Check · 小測驗
1. In binary, what is 1 + 1?
2. In a half adder, which gate gives the carry?
3. How many bits does a full adder add together?
4. What is 0111 + 0001?
5. According to the reading, where did George Stibitz build his relay adder?
Try It in the Model · 在模型裡試試
Then set your own numbers. What is the biggest answer this adder can give, and how many lights does it take?
接著自己設兩個數。這台加法器最大能算出多少?需要幾盞燈來顯示?
No column has two 1s. Watch each block work alone, with nothing passed along.
沒有哪一位同時有兩個 1。看每個方塊各算各的,什麼都不用傳。
The smallest sum that needs a carry. Where does the 1 end up?
需要進位的最小的加法。那個 1 最後跑到哪裡去了?
In slow motion, count how many blocks the carry passes through.
用慢動作看,數數進位經過了幾個方塊。
Fifteen plus one. Watch the last carry leave the fourth block. Where can it go?
十五加一。看最後的進位離開第四個方塊:它能去哪裡?
Look Inside · 打開來看
Tap A and B to set them to 0 or 1 and watch the two outputs. Then switch to the full adder, which has a third input for the carry coming in. The table shows every possible case, and the row you are on is highlighted.
點 A 和 B,把它們設成 0 或 1,看兩個輸出怎麼變。再切到全加器,它多了第三個輸入:進來的進位。表格列出每一種可能的情況,你現在在哪一列會亮起來。
Carry · 進位0
Sum · 和0
Game · 小遊戲
Two sums, four columns each. Start at the right. For each column, add the two bits and the carry, then choose what to write and what to carry. The game counts how many columns you get right on the first try.
兩道加法,每道四位。從最右邊開始。每一位把兩個位元和進位加起來,再選要寫什麼、進什麼。遊戲會記下你第一次就答對幾格。
Right on the first try · 第一次就答對 0 / 0
Stories of Adding Machines · 加法機的故事
Four short stories about machines that add.
關於會做加法的機器的四個小故事。
1642–1644 · Pascaline
Blaise Pascal designed and built his machine between 1642 and 1644 for his father, a tax collector. Numbers were entered by turning its dials, and it could only add and subtract. Britannica calls it the first calculator or adding machine to be produced in any quantity and actually used: Pascal built 50 of them over the next ten years. It counted in tens, not twos, and it was made of moving parts, not switches.
巴斯卡在 1642 到 1644 年之間,為當稅務官的父親設計並製造了這台機器。用轉盤把數撥進去,它只會加和減。大英百科說,它是第一種有一定產量、而且真的有人使用的計算機:之後十年間巴斯卡造了 50 台。它用的是十進位,不是二進位;裡面是會動的機械零件,不是開關。
1937 · Model K
One weekend at home, George Stibitz of Bell Laboratories fastened two relays from the laboratory’s scrap pile to a piece of plywood, added flashlight bulbs and strips cut from a tobacco can, and had a one-digit binary adder. It was named the Model K, for the kitchen table it was built on. Most accounts date it to 1937; some say 1936. The Computer History Museum says it proved that Boolean logic could be used to design computers.
某個週末,貝爾實驗室的喬治・史提比茲在家裡,把兩個從實驗室廢料堆撿來的繼電器釘在一塊夾板上,加上手電筒燈泡和從菸草罐剪下來的金屬片,做出一個一位的二進位加法器。它叫做 Model K,K 就是它誕生的那張廚房(kitchen)桌子。大多數資料說這是 1937 年的事,也有說 1936 年的。電腦歷史博物館說,它證明了布林邏輯可以用來設計電腦。
NAND
The adder in this lesson uses three kinds of gates: AND, OR, and XOR. Surprisingly, a chip does not need three kinds. A NAND gate is an AND followed by a NOT, and every other gate can be built out of NAND gates alone. So a whole adder, and in principle a whole computer, can be made by repeating one tiny part again and again.
這一課的加法器用了三種閘:AND、OR、XOR。讓人意外的是,晶片並不需要三種。NAND 閘就是 AND 後面接一個 NOT,而其他每一種閘都可以只用 NAND 閘做出來。所以一整個加法器,原則上連一整台電腦,都可以靠同一個小零件一再重複做出來。
ALU
Inside a processor, the adder is part of a section called the arithmetic logic unit, or ALU. The same section also holds the circuits for the logic of Lesson 3. When a program adds two numbers, compares them, or combines them with AND or OR, the work is done here. You will meet the rest of the processor in Unit 2.
在處理器裡,加法器屬於一個叫做「算術邏輯單元」(ALU)的部分,第三課的邏輯運算電路也在這裡。程式要把兩個數加起來、比大小,或用 AND、OR 把它們合起來的時候,工作就是在這裡做的。處理器其他的部分,單元二會看到。
Myth vs. Fact · 常見迷思
✗ Myth · 迷思A computer looks up the answer to a sum, the way you remember that 7 + 8 is 15.電腦是用「查」的,就像你背得出 7+8=15。
✓ Fact · 事實There is nothing to remember. The answer falls out of the wiring: each column’s gates produce a sum bit and a carry, every time, for any two numbers.它沒有背任何東西。答案是從接線裡自己跑出來的:每一位的閘都會算出一個和、一個進位,不管是哪兩個數,每次都一樣。
✗ Myth · 迷思In binary, 1 + 1 = 10 means one plus one is ten.二進位的 1+1=10,意思是一加一等於十。
✓ Fact · 事實The amount is still two. “10” is how two is written with binary digits: one in the twos place and zero in the ones place.數量還是二。「10」只是二用二進位寫出來的樣子:「二」那一位是 1,「一」那一位是 0。
✗ Myth · 迷思The adder works on one column at a time, like a person with a pencil.加法器跟拿筆算的人一樣,一次只做一位。
✓ Fact · 事實All the columns are wired up at once, and every block starts working as soon as its inputs arrive. Only the carries have to wait, because each one depends on the column to its right.每一位的線路都是同時接好的,輸入一到,每個方塊就開始工作。要等的只有進位,因為每個進位都得看右邊那一位的結果。
✗ Myth · 迷思Adding bigger numbers needs a smarter kind of circuit.要加更大的數,就需要更聰明的電路。
✓ Fact · 事實It needs more of the same. Each extra column is one more full adder, and each extra column doubles the largest number the adder can take.需要的是更多同樣的東西。每多一位就多一個全加器,而每多一位,加法器能處理的最大的數就加倍。
Remember It · 記憶口訣
Two gates add two bits: a half adder.
兩個閘就能加兩個位元:半加器。
A full adder adds A, B, and the carry in. It gives a sum and a carry out.
全加器把 A、B 和進來的進位加起來,給出一個和、一個出去的進位。
Each column hands its carry to the next, like falling dominoes.
每一位把進位交給下一位,像骨牌一樣倒過去。
In one column: none is 0, one is 1, two is 10, three is 11.
只看一位:沒有是 0,一個是 1,兩個是 10,三個是 11。
Before You Start · 動手之前
Classroom Activity 1 · 課堂活動一
You need · 準備材料
Steps · 步驟
Nobody in the row knows what the whole sum is. Each student only counts to three and follows two rules, and the right answer still appears. That is exactly how the adder in a chip works. Try 1111 + 0001 and ask where the last ball should go. In Taiwan’s junior high Information Technology curriculum, adders are not listed by name; this lesson supports the topic “System platforms” (資 S-IV-2, how system platforms are built and basically work).
這一排人沒有一個知道整個加法是多少。每個人只數到三、照兩條規則做,正確答案還是出現了。晶片裡的加法器就是這樣工作的。試試 1111+0001,問問大家最後那顆球該交給誰。十二年國教國中「資訊科技」的學習內容沒有直接列出加法器;這一課可以用來支援「系統平台」主題(資 S-IV-2 系統平台之組成架構與基本運作原理)。
Classroom Activity 2 · 課堂活動二
You need · 準備材料
Steps · 步驟
The answers are 1000, 1000, and 10000. For a second check, open a browser’s developer console and type (0b0101 + 0b0011).toString(2). In JavaScript, a number that starts with 0b is written in binary. The console answers "1000".
答案分別是 1000、1000、10000。還有第二種驗證法:打開瀏覽器的開發人員主控台,輸入 (0b0101 + 0b0011).toString(2)。在 JavaScript 裡,0b 開頭的數就是用二進位寫的。主控台會回答 "1000"。
Go Further · 延伸閱讀
Sources · 資料出處
Names, dates, and facts on this page were checked against these sources (October 2026); every sum in the model is computed from gates and tested against real addition · 本頁的人名、年代與事實依下列資料查證(2026 年 10 月);模型裡的每一個加法都是用邏輯閘算的,並和真正的加法核對過