← 回電腦概論 · All Lessons

How Computers Work · Unit 1 · Lesson 3 · 電腦概論 單元一 第三課

How Does a Computer Make a Decision?電腦怎麼做決定?

Wire two switches in a row, side by side, or as a seesaw, and watch a light answer AND, OR, and NOT in 3D. Then connect gates to solve six everyday puzzles and test yourself on truth tables.
在 3D 裡把開關排成一排、一上一下,或做成蹺蹺板,看一盞燈怎麼回答「而且」「或者」「不是」。再把閘接起來解六個生活裡的題目,用真值表考考自己。

Big idea · 一句話看懂

A computer decides by wiring switches together. Switches in a row answer AND, switches side by side answer OR, and a switch that works backward answers NOT. These logic gates take in 0s and 1s and give out a 0 or a 1, and gates joined to other gates can answer any yes-or-no question.
電腦做決定,靠的是把開關接在一起。排成一排的開關回答「而且」,一上一下的開關回答「或者」,反著做的開關回答「不是」。這些邏輯閘吃進 0 和 1、吐出一個 0 或 1;一個閘接一個閘,就能回答任何「是或不是」的問題。

3D Model · 3D 模型

Three Ways to Wire a Switch 開關的三種接法

A battery, a light, and switches on a board. Tap a switch to push its handle down: down means 1, up means 0. When there is a complete path of copper from the battery to the light and back, dots run along the wire and the light turns on. Choose AND, OR, or NOT to rewire the board, and watch which row of the truth table you are on.
木板上有一顆電池、一盞燈和幾個開關。點一下開關,把它的把手壓下去:壓下去是 1,翹起來是 0。只要從電池到燈、再回到電池有一條完整的銅線,線上就有光點在跑,燈也會亮。選 AND、OR 或 NOT 換一種接法,同時看看自己現在在真值表的哪一列。

Tap a switch · 點一下開關 Drag to turn · 拖曳旋轉 Scroll or pinch to zoom · 滾輪/雙指縮放

This 3D model needs WebGL, which this browser does not support. The A and B buttons and the truth table below still work, and so do the reading and the games.
這個瀏覽器不支援 WebGL,無法顯示 3D 模型;下面的 A、B 按鈕和真值表照樣能用,課文和小遊戲也都能用。

  • Copper arm: pushed down, it bridges the gap in the wire (1); lifted, it leaves a gap (0)
    銅臂:壓下去就搭在缺口上(1),翹起來就留下缺口(0)
  • Seesaw switch: pushing the handle down lifts the contact at the other end
    蹺蹺板開關:把手壓下去,另一頭的接點反而翹起來
  • Moving dots: there is a complete path, so current is flowing
    會動的光點:路是通的,有電流在流
  • Light on: the answer is 1
    燈亮:答案是 1

A teaching model. In a real computer nobody pushes the switches: each gate is built from a few transistors, which are switches turned on and off by electricity, and the output of one gate drives the inputs of others. Real gates are far too small to see, and they do not have copper arms or light bulbs. The dots only show that a path is complete; electric current is not a row of little balls. The logic is exact: every row of the truth tables matches what real AND, OR, and NOT gates do.
這是教學用的示意模型。真的電腦裡沒有人去壓開關:每個閘是用幾個電晶體做成的,電晶體是由電來控制開和關的開關,一個閘的輸出會去推動別的閘的輸入。真的閘小到看不見,也沒有銅臂和燈泡。光點只是表示「路通了」,電流並不是一排小球。邏輯是精確的:真值表的每一列,都和真的 AND、OR、NOT 閘一樣。

Model and code are drawn and programmed by My Culture Connect. The truth tables and puzzles are tested in tools/computers/test/logic.test.mjs.
模型與程式由人師教育協會自行繪製、撰寫;真值表與題目有自動測試(tools/computers/test/logic.test.mjs)。

Reading · 英文閱讀

3

Unit 3: How Does a Computer Make a Decision?

Every day a computer makes countless small decisions. Your phone unlocks only if the passcode is right. A game ends if you run out of lives. A message goes out if you tap Send and you are online. But Lessons 1 and 2 showed that a computer holds nothing except switches and numbers. Nobody inside is thinking. So how can a pile of switches decide anything? The secret is in how the switches are wired together.

電腦每天要做數不清的小決定。密碼對了,手機才會解鎖。命用完了,遊戲就結束。你按了「傳送」而且有連上網路,訊息才會送出去。可是第一課和第二課告訴我們,電腦裡除了開關和數,什麼都沒有,裡面並沒有誰在思考。那麼一堆開關怎麼能決定任何事?祕密就在這些開關是怎麼接在一起的。

Start with a battery, a light, and two switches, A and B. Wire the switches in a row, one after the other. Now the current has to pass through both, so the light turns on only if A and B are both on. This arrangement is called an AND gate. Next, wire the two switches side by side, so that the current has two roads to choose from. Now the light turns on if A or B is on, or both. This is an OR gate.

先準備一顆電池、一盞燈,還有兩個開關 A 和 B。把兩個開關排成一排,一個接一個。這樣電流兩個都得通過,所以只有 A 和 B 都打開,燈才會亮。這種接法叫做 AND 閘(及閘)。接著把兩個開關改成一上一下並排,讓電流有兩條路可以選。這樣只要 A 或 B 打開(兩個都開也算),燈就會亮。這是 OR 閘(或閘)。

The third kind is the simplest and the strangest. It has only one input, and its output is always the opposite. If the input is on, the output is off. If the input is off, the output is on. It is called a NOT gate, and in the model it is a switch built like a seesaw. AND, OR, and NOT are the three basic logic gates. Each one takes in 0s and 1s and gives out a single 0 or 1.

第三種最簡單,也最奇怪。它只有一個輸入,輸出永遠和輸入相反:輸入是開,輸出就是關;輸入是關,輸出就是開。它叫做 NOT 閘(反閘),在模型裡是一個做成蹺蹺板的開關。AND、OR、NOT 是三種基本的邏輯閘。每一種都吃進 0 和 1,吐出一個 0 或 1。

You can write down everything a gate does in a small chart called a truth table. It has one row for every possible set of inputs. Two inputs can be set in four ways, so the table for AND has four rows, and only the last row, 1 and 1, gives a 1. In a real computer, nobody flips the switches by hand. The gates are made of transistors, which are switches turned on and off by electricity. That is why the output of one gate can become the input of the next.

一個閘做的所有事,可以寫成一張小表,叫做「真值表」。每一種可能的輸入各占一列。兩個輸入有四種設法,所以 AND 的真值表有四列,只有最後一列(1 和 1)的結果是 1。在真的電腦裡,沒有人用手去撥開關。邏輯閘是用電晶體做的,電晶體是由電來控制開和關的開關。所以一個閘的輸出,可以變成下一個閘的輸入。

The idea is older than computers. In 1854, a largely self-taught English mathematician named George Boole published a book known as The Laws of Thought. He showed that logic could be worked out like algebra, with symbols and rules. His system is now called Boolean algebra, and it is the basis for designing computer circuits. Boole died in 1864, long before anyone built an electronic computer. Decades later, a student named Claude Shannon showed that Boole’s algebra fits circuits made of switches.

這個想法比電腦還老。1854 年,一位大半靠自學的英國數學家喬治・布爾(George Boole)出版了一本書,通稱《思維的法則》。他證明邏輯可以像代數一樣,用符號和規則來運算。他的這套系統現在叫做「布林代數」,是設計電腦電路的基礎。布爾在 1864 年過世,離第一台電子電腦出現還早得很。幾十年後,一位名叫克勞德・夏農的學生指出,布爾的代數正好能用來描述開關接成的電路。

One gate answers one small question. The power comes from joining gates together. “Go out to play if it is NOT raining AND your homework is done” needs two gates: a NOT and an AND. Join more of them, and a circuit can compare two numbers, choose between two paths, or, as you will see in the next lesson, add. A modern chip holds billions of transistors wired into gates. Every decision a computer seems to make is really a great many tiny yes-or-no questions, answered by gates one after another.

一個閘只回答一個小問題,把閘接在一起才有力量。「沒下雨,而且功課做完了,才可以出去玩」需要兩個閘:一個 NOT、一個 AND。再多接幾個,電路就能比較兩個數的大小、在兩條路之間做選擇,或者——下一課就會看到——做加法。一顆現代的晶片上有幾十億個電晶體,接成了邏輯閘。電腦看起來在做的每一個決定,其實是非常多個小小的「是或不是」,由邏輯閘一個接一個回答出來的。
Read aloud · 課文朗讀

Questions · 閱讀理解

How are the switches wired in an AND gate, and when does the light turn on?

They are wired in a row, one after the other. The current must pass through both, so the light turns on only if both switches are on.

What does a NOT gate do?

It has one input, and its output is always the opposite: 1 becomes 0, and 0 becomes 1.

Why does it matter that the output of one gate can be the input of another?

Because one gate answers only one small question. When gates are joined, they can answer bigger questions, such as “NOT raining AND homework done,” and with enough gates a circuit can compare, choose, and add.

Words & Phrases · 生字及片語

logic(n.)邏輯There is no logic in wearing a coat on such a hot day.這麼熱的天穿外套,一點也不合邏輯。gate(n.)閘;大門A logic gate lets current through only when its rule is met.邏輯閘只有在符合它的規則時,才讓電流通過。input(n.)輸入A keyboard sends input to the computer.鍵盤把輸入送進電腦。output(n.)輸出The output of a NOT gate is the opposite of what goes in.反閘的輸出和進去的東西相反。circuit(n.)電路The light will not work until the circuit is complete.電路沒有接通之前,燈不會亮。opposite(n.)相反的事物Hot is the opposite of cold.熱是冷的相反。decision(n.)決定Choosing a high school is a big decision.選高中是一個重大的決定。combine(v.)結合;組合Combine the flour and the eggs in a large bowl.把麵粉和蛋放進大碗裡混在一起。

Quick Check · 小測驗

1. Two switches are wired in a row. When does the light turn on?

2. A is 1 and B is 0. What is A OR B?

3. What is NOT 1?

4. How many rows does a truth table need for a gate with two inputs?

5. According to the reading, what are the gates in a real computer made of?

Try It in the Model · 在模型裡試試

Four things to watch 四件值得看的事

Then try it yourself: set A to 1 and B to 1. Which wirings turn the light on, and which one cannot even use B?
接著自己試:把 A 和 B 都設成 1。哪幾種接法燈會亮?哪一種根本用不到 B?

In a row: AND排成一排:AND

1 only when both are 1 · 兩個都是 1 才是 1

Watch all four rows of the table. In how many of them does the light turn on?
把真值表的四列都看一遍。有幾列燈會亮?

Side by side: OR一上一下:OR

1 when at least one is 1 · 至少有一個是 1 就是 1

Now the current has two roads. Which is the only row that leaves the light off?
現在電有兩條路可以走。只有哪一列燈不亮?

A seesaw: NOT蹺蹺板:NOT

The output is the opposite · 輸出和輸入相反

Push the handle down and look at the other end of the seesaw. Why does the light go off?
把把手壓下去,看看蹺蹺板的另一頭。燈為什麼滅了?

Same switches, different wiring同樣的開關,不同的接法

A = 1, B = 0 · A=1、B=0

Leave the switches alone and change only the wires, from AND to OR and back.
開關不動,只把線從 AND 改成 OR,再改回來。

Try It · 動手試試

Wire Up the Gates 把閘接起來

Each puzzle is a rule from everyday life. Choose AND or OR, and decide whether to put a NOT in front of A or B. The table compares what the rule wants with what your circuit does. When all four rows match, the light turns on.
每一題都是生活裡的一條規則。選 AND 或 OR,再決定要不要在 A 或 B 的前面加一個 NOT。表格會把「規則要的」和「你接的電路做的」一列一列對照;四列都對了,燈就亮。

Solved · 已完成 0 / 6

Your circuit · 你接的電路

ABWanted要的Yours你接的

  • Read the rule out loud and listen for the words and, or, and not. Each one is a gate.把規則唸出來,聽聽裡面的「而且」「或者」「不」:每一個就是一個閘。
  • With AND or OR, and a NOT you can put in front of each input, you can build eight different circuits.AND 或 OR,加上每個輸入前面可以放的 NOT,一共能接出八種不同的電路。
  • These are made-up rules for practice. A real alarm or car has many more inputs than two.這些是練習用的規則。真正的警報器或汽車,輸入遠遠不只兩個。

Game · 小遊戲

Be the Gate 換你當邏輯閘

Eight questions. You are given A and B, and you answer 0 or 1. The first questions use one gate; the last three join two. The game counts how many you get right on the first try.
一共八題。題目給你 A 和 B,你回答 0 或 1。前面幾題只有一個閘,最後三題把兩個閘接在一起。遊戲會記下你第一次就答對幾題。

Right on the first try · 第一次就答對 0 / 0

Stories Behind the Gates · 邏輯閘的故事

A schoolteacher, a student, a word in every program, and the word “or” 一位小學老師、一個學生、每個程式裡都有的字、還有「或」這個字

Four short stories about where the logic in a computer came from.
電腦裡的邏輯從哪裡來的四個小故事。

1854 · George Boole

The teacher who turned logic into algebra把邏輯變成代數的老師

George Boole was born in Lincoln, England, in 1815. Apart from lessons from his father and a few years at local schools, he was self-taught in mathematics. He began teaching in village schools at 16 and opened his own school at 20. In 1849 he became professor of mathematics at Queen’s College in Cork, Ireland, even though he had no university degree. His 1854 book on the laws of thought was, in his own view, the mature statement of his ideas.
喬治・布爾 1815 年生於英格蘭的林肯。除了父親教他的和在當地學校讀的幾年,他的數學都是自學的。他 16 歲開始在鄉村學校教書,20 歲自己開了一所學校。1849 年,他成為愛爾蘭科克的皇后學院數學教授,雖然他沒有大學學位。1854 年那本談思維法則的書,是他自己認為最成熟的一次陳述。

MIT · Claude Shannon

The student who saw algebra in the switches在開關裡看見代數的學生

For decades, Boole’s algebra was a subject for logicians. Claude Shannon, the same person who gave us the word “bit” in Lesson 1, changed that. His master’s thesis at MIT, A Symbolic Analysis of Relay and Switching Circuits, used Boolean algebra to work out circuits made of switches. Britannica says it established the theoretical underpinnings of digital circuits and has been called one of the most significant master’s theses of the 20th century.
有好幾十年,布爾的代數是邏輯學家在研究的東西。改變這件事的是克勞德・夏農,就是第一課裡讓「bit」這個詞傳開的那個人。他在麻省理工學院的碩士論文〈繼電器與開關電路的符號分析〉,用布林代數來推算開關接成的電路。大英百科說,這篇論文奠定了數位電路的理論基礎,被稱為二十世紀最重要的碩士論文之一。

true / false

Boole’s name is in every program每個程式裡都有布爾的名字

Programmers call a value that can only be true or false a Boolean, after George Boole. Programming languages have the three gates built in. In JavaScript, the language of web pages, AND is written &&, OR is written ||, and NOT is written !. So true && false gives false, true || false gives true, and !true gives false. You can try all three in your browser in the second activity below.
寫程式的人把「只能是真或假」的值叫做 Boolean(布林值),就是用喬治・布爾的名字取的。程式語言裡本來就有這三種閘。在網頁用的 JavaScript 裡,AND 寫成 &&,OR 寫成 ||,NOT 寫成 !。所以 true && false 得到 false,true || false 得到 true,!true 得到 false。下面的第二個活動,就是在瀏覽器裡把這三個都試一遍。

OR · 或

Two kinds of “or”兩種「或」

“Soup or salad?” usually means choose one, not both. A logic OR is different: A OR B is 1 when A is 1, when B is 1, and also when both are 1. A truth table shows it plainly: “p or q” is false only when both are false. The choose-only-one kind has its own name, exclusive OR, or XOR. It is 1 when exactly one input is 1, and it will be useful in the next lesson.
「湯或沙拉?」通常是要你選一樣,不是兩樣都要。邏輯的 OR 不一樣:A 是 1、B 是 1,或者兩個都是 1 的時候,A OR B 都是 1。真值表寫得很清楚:「p 或 q」只有在兩個都是假的時候才是假。「只能選一個」的那種有自己的名字,叫做互斥或(XOR):恰好只有一個輸入是 1 的時候才是 1。下一課會用到它。

Myth vs. Fact · 常見迷思

Four things people get wrong 四個常見的誤會

✗ Myth · 迷思A computer thinks about a question the way a person does.電腦像人一樣思考問題。

✓ Fact · 事實A gate does not know what its inputs mean. It only follows its wiring: 1s and 0s in, a 1 or a 0 out. People decide what the inputs stand for and how the gates are joined.邏輯閘不知道它的輸入代表什麼。它只是照著接線走:進來 1 和 0,出去一個 1 或 0。輸入代表什麼、閘要怎麼接,是人決定的。

✗ Myth · 迷思1 AND 1 is 2.1 AND 1 等於 2。

✓ Fact · 事實AND is not addition. It asks a question: are both inputs 1? The answer is yes, which is written 1. A gate can never give out anything but 0 or 1.AND 不是加法。它在問一個問題:兩個輸入都是 1 嗎?答案是「是」,寫成 1。邏輯閘吐出來的永遠只有 0 或 1。

✗ Myth · 迷思OR means one or the other, but not both.OR 的意思是二選一,不能兩個都是。

✓ Fact · 事實In logic, A OR B is also 1 when both are 1. The one-but-not-both kind is a different gate called XOR.在邏輯裡,兩個都是 1 的時候 A OR B 也是 1。「只能一個、不能兩個」是另一種閘,叫做 XOR。

✗ Myth · 迷思A computer needs a different kind of part for every kind of decision.電腦每做一種決定,就需要一種不同的零件。

✓ Fact · 事實The same few kinds of gates are used over and over. What changes is how many there are and how they are wired together.用來用去就是那幾種閘。不一樣的是用了多少個、怎麼接在一起。

Remember It · 記憶口訣

Gates in a sentence 一句話記住邏輯閘

AND: bothAND:兩個都要

In a row. 1 only when both are 1.
排成一排。兩個都是 1 才是 1。

OR: at least oneOR:至少一個

Side by side. 0 only when both are 0.
一上一下。兩個都是 0 才是 0。

NOT: flip itNOT:反過來

One in, the opposite out.
一個進去,相反的出來。

One row for every case每一種情況一列

A truth table lists every possible input: 2 rows for one input, 4 for two, 8 for three.
真值表把每一種可能的輸入都列出來:一個輸入 2 列,兩個 4 列,三個 8 列。

Before You Start · 動手之前

A few reminders 幾個提醒

  • If you build these circuits for real, use only small batteries such as AA cells and a small bulb or LED made for them. Never use the wall socket.如果要真的接這些電路,只能用小電池(例如三號電池)和搭配它的小燈泡或 LED,絕對不要用牆上的插座。
  • Never join the two ends of a battery directly with a wire. With nothing in between to use the energy, the wire and the battery can get hot very quickly.絕對不要用一條線直接把電池的兩頭接在一起。中間沒有東西用電,電線和電池會很快變燙。
  • In the developer console, type only what this lesson shows, and never paste in code that someone else tells you to paste.在開發人員主控台裡,只輸入這一課寫的那幾行;別人叫你貼的程式碼絕對不要貼。
  • Use a school or family computer only with permission, and do not change its settings.用學校或家裡的電腦要先得到同意,也不要更改設定。

Classroom Activity 1 · 課堂活動一

Human Logic Gates 人體邏輯閘

You need · 準備材料

  • Three cards: AND, OR, NOT三張卡片:AND、OR、NOT
  • Two more cards for the inputs: A and B另外兩張輸入卡片:A、B
  • Space at the front of the room教室前面的空間

Steps · 步驟

  1. Two students are the inputs A and B. A raised hand means 1, and a hand down means 0. A third student is the gate and holds the AND card.兩位同學當輸入 A 和 B:舉手是 1,手放下是 0。第三位同學當邏輯閘,拿著 AND 卡片。
  2. The gate student looks only at the two inputs and follows the rule on the card: stand up for 1, sit down for 0. Try all four ways A and B can be set, and write the results on the board as a truth table.當邏輯閘的同學只看這兩個輸入,照卡片上的規則做:站起來是 1,坐下是 0。把 A、B 的四種情況都試一遍,把結果寫在黑板上,就是一張真值表。
  3. Change the card to OR and fill in a second table. Then try NOT with only one input.把卡片換成 OR,填出第二張表。再用一個輸入試 NOT。
  4. Now join two gates. A NOT student watches input A, and an AND student watches the NOT student and input B. The class calls out a rule for the row where the AND student stands, such as “NOT raining AND homework done.”接著把兩個閘接起來:一位 NOT 同學看著輸入 A,一位 AND 同學看著 NOT 同學和輸入 B。AND 同學站起來的那一列,請全班替它想一句規則,例如「沒下雨,而且功課做完了」。

The gate students never need to know what A and B stand for. They only follow a card. That is exactly the point of the first myth above. In Taiwan’s junior high Information Technology curriculum, logic gates are not listed by name; this lesson supports the topic “System platforms” (資 S-IV-2, how system platforms are built and basically work).
當邏輯閘的同學完全不需要知道 A、B 代表什麼,只要照卡片做。這正是上面第一個迷思要說的事。十二年國教國中「資訊科技」的學習內容沒有直接列出邏輯閘;這一課可以用來支援「系統平台」主題(資 S-IV-2 系統平台之組成架構與基本運作原理)。

Classroom Activity 2 · 課堂活動二

Check It on Your Own Computer 在自己的電腦上驗證

You need · 準備材料

  • A computer with a web browser such as Chrome, Edge, Firefox, or Safari一台有瀏覽器的電腦(Chrome、Edge、Firefox 或 Safari)
  • A sheet of paper for your predictions一張紙,用來寫下你的預測

Steps · 步驟

  1. Open the browser’s developer console. In Chrome, press Command+Option+J on a Mac, or Control+Shift+J on Windows.打開瀏覽器的開發人員主控台。Chrome:Mac 按 Command+Option+J,Windows 按 Control+Shift+J。
  2. Type true && false and press Enter. The browser answers false. That is AND: 1 AND 0 is 0.輸入 true && false 再按 Enter,瀏覽器會回答 false。這就是 AND:1 AND 0 是 0。
  3. Type true || false and then !true. Before you press Enter each time, write down what you expect.再輸入 true || false,然後輸入 !true。每次按 Enter 之前,先把你預測的答案寫下來。
  4. Now join gates the way the puzzles do: type !true && true, then !(true && true). Check each answer against a truth table you draw yourself.接著像小遊戲那樣把閘接起來:輸入 !true && true,再輸入 !(true && true)。自己畫真值表,核對每一個答案。

The answers are false, true, false, false, and false. A spreadsheet has the same gates: in Google Sheets or Excel, type =AND(TRUE, FALSE), =OR(TRUE, FALSE), and =NOT(TRUE). The words are different, but the truth tables are the same ones Boole’s algebra describes.
答案依序是 false、true、false、false、false。試算表裡也有同樣的閘:在 Google 試算表或 Excel 輸入 =AND(TRUE, FALSE)、=OR(TRUE, FALSE)、=NOT(TRUE)。寫法不同,真值表卻是布林代數描述的同一張。

Sources · 資料出處

Names, dates, and facts on this page were checked against these sources (October 2026); the truth tables and puzzles are computed and tested · 本頁的人名、年代與事實依下列資料查證(2026 年 10 月);真值表與題目是自己算的,並有測試

  1. George Boole (1815–1864): English mathematician, largely self-taught; professor of mathematics at Queen’s College, Cork, from 1849 with no university degree; published An Investigation into the Laws of Thought in 1854; his algebra of logic is now called Boolean algebra and is basic to the design of digital computer circuits喬治・布爾(1815–1864):英國數學家,數學大半靠自學;1849 年起任科克皇后學院數學教授(沒有大學學位);1854 年出版《思維法則的研究》;他的邏輯代數現在叫布林代數,是設計數位電腦電路的基礎Encyclopaedia Britannica, “George Boole” ↗
  2. Boolean algebra works with propositions that are either true (1) or false (0); “a AND b” is true when both a and b are true, and false otherwise布林代數處理的命題不是真(1)就是假(0);「a AND b」只有在 a、b 都為真時才為真Encyclopaedia Britannica, “Boolean algebra” ↗
  3. A truth table has a row for every possible combination, four rows for two parts; “p or q” is false only when both p and q are false真值表每一種可能的組合占一列,兩個命題就有四列;「p 或 q」只有在兩者都為假時才為假Encyclopaedia Britannica, “truth table” ↗
  4. Shannon’s MIT master’s thesis, A Symbolic Analysis of Relay and Switching Circuits, used Boolean algebra to establish the theoretical underpinnings of digital circuits夏農在麻省理工的碩士論文〈繼電器與開關電路的符號分析〉用布林代數奠定數位電路的理論基礎Encyclopaedia Britannica, “Claude Shannon” ↗
  5. “Series switches ⇒ AND function / Parallel switches ⇒ OR function” (when 1 means a closed switch)串聯的開關=AND,並聯的開關=OR(以 1 代表開關接通)Andrew Mason, ECE 410 lecture notes, Michigan State University ↗
  6. In a chip a transistor operates as a switch: if a current flows, the circuit is on, and if not, it is off在晶片裡,電晶體當開關用:有電流就是開,沒有就是關Encyclopaedia Britannica, “transistor” ↗
  7. Logic gates built from transistors, including an inverter that computes the Boolean NOT function用電晶體做成的邏輯閘,包括計算布林 NOT 的反相器Bob Brown, “Transistors and Digital Logic Gates,” Kennesaw State University ↗
  8. “M4 consists of 28 billion transistors” (billions of transistors on one chip, 2024)「M4 由 280 億個電晶體組成」(一顆晶片上有幾十億個電晶體,2024 年)Apple Newsroom, “Apple introduces M4 chip,” May 7, 2024 ↗
  9. JavaScript: && is true if and only if all the operands are true; || is true if one or more operands is true; ! takes truth to falsity and vice versaJavaScript:&& 要所有運算元都為真才是真;|| 只要有一個為真就是真;! 把真變假、假變真MDN Web Docs, “Logical AND (&&)” (see also Logical OR and Logical NOT) ↗
  10. Spreadsheets: AND returns true if all of the arguments are true (see also OR and NOT)試算表:所有引數都為真時 AND 傳回 TRUE(另有 OR、NOT)Google Docs Editors Help, “AND function”; Microsoft Support, “AND function” ↗
  11. Chrome: Command+Option+J (Mac) or Control+Shift+J (Windows, Linux) opens the ConsoleChrome:Command+Option+J(Mac)或 Control+Shift+J(Windows、Linux)打開主控台Chrome for Developers, “Open Chrome DevTools” ↗
  12. A short circuit across a battery generates high heat電池短路會產生高熱Energizer, Alkaline Manganese Dioxide Handbook and Application Manual ↗
  13. Taiwan terms: logic gate 邏輯閘, AND gate 及閘, OR gate 或閘, NOT gate 反閘, truth table 真值表, Boolean algebra 布林代數, exclusive OR 互斥或台灣用語:logic gate 邏輯閘、AND gate 及閘、OR gate 或閘、NOT gate 反閘、truth table 真值表、Boolean algebra 布林代數、exclusive OR 互斥或(高中以下資訊名詞、電子計算機名詞)國家教育研究院《樂詞網》 ↗
  14. 資 S-IV-2, how system platforms are built and basically work (p. 10); logic gates are not listed by name資 S-IV-2 系統平台之組成架構與基本運作原理(第 10 頁);學習內容沒有直接列出邏輯閘教育部《十二年國民基本教育課程綱要 國民中學暨普通型高級中等學校 科技領域》(2018) ↗
  15. Truth tables of AND (0, 0, 0, 1), OR (0, 1, 1, 1), NOT (1, 0), and XOR (0, 1, 1, 0); two inputs give 4 rows and three give 8; the six puzzles and their answers; the console examplesAND(0、0、0、1)、OR(0、1、1、1)、NOT(1、0)、XOR(0、1、1、0)的真值表;兩個輸入 4 列、三個 8 列;六題與答案;主控台的例子Our own work, checked by tools/computers/test/logic.test.mjs ↗