How Computers Work · 電腦概論
How Computers Work 電腦概論
We use computers every day, but how do they really do it? This series starts with a single switch and climbs, one question at a time, to programs, the internet, and AI.
電腦天天在用,可是它到底怎麼做到的?這個系列從一個開關講起,一次回答一個問題,一路講到程式、網路和 AI。
The whole series is one building that goes up floor by floor: bits, then logic, then the machine, then programs, then networks and AI. Each lesson stands on the one before it and explains a single idea, with a 3D model you can play with and a short English reading, with Chinese a tap away.
整個系列像一棟一層一層往上蓋的樓:位元、邏輯、機器、程式,再到網路與 AI。每一課都站在上一課上面,只講清楚一件事:有一個可以動手玩的 3D 模型,再讀一篇英文短文把它說明白,中文翻譯隨點隨看。
Every lesson also has one thing you can check on your own computer, so you can see that what the lesson says is real. Names, dates, and numbers are checked against the sources listed at the bottom of each lesson, and the models say plainly where a real computer is different.
每一課還有一件可以在自己電腦上動手驗證的事,親眼看到課文講的是真的。人名、年代和數字都依每課最下方列出的資料查證;模型和真的電腦哪裡不一樣,也會說清楚。
All 16 lessons are ready.
16 課全部完成。
Unit 1 · 單元一
The Language of Computers: 0 and 1 電腦的語言:0 和 1
Why a computer uses only two digits, how those digits turn into words, pictures, and sound, and how a few simple switches can make decisions and add numbers.
電腦為什麼只用兩個數字、這兩個數字怎麼變成文字、圖片和聲音,以及幾個簡單的開關怎麼做決定、做加法。
Why Do Computers Use Only 0 and 1?
電腦為什麼只用 0 和 1?Flip eight switches in 3D and watch a row of light bulbs count from 0 to 255. Count to 31 on one hand, read numbers written in lights, and see why on and off are so hard to mix up.在 3D 裡撥八個開關,看一排燈泡從 0 數到 255。用一隻手數到 31、讀出用燈寫的數字,再看看為什麼「開」和「關」最不容易弄錯。Start the lesson · 開始上課 →How Do 0s and 1s Become Words, Pictures, and Sound?
0 和 1 怎麼變成文字、圖片和聲音?Walk up to a wall of pixels in 3D, read the three numbers behind one colored square, and change its color with the eight switches from Lesson 1. Type a character to see its number, draw a picture with 64 bits, and turn a sound wave into a list of numbers.在 3D 裡走近一面像素牆,讀出一個彩色方塊背後的三個數,再用第一課的八個開關改它的顏色。打一個字看它的編號、用 64 個位元畫一張圖,再把一段聲波變成一串數。Start the lesson · 開始上課 →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 裡把開關排成一排、一上一下,或做成蹺蹺板,看一盞燈怎麼回答「而且」「或者」「不是」。再把閘接起來解六個生活裡的題目,用真值表考考自己。Start the lesson · 開始上課 →How Does a Computer Add?
電腦怎麼做加法?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 裡看一台四位元加法器一位一位地算,進位從右邊跳到左邊。看看半加器裡面的兩個閘,再換你自己當加法器。Start the lesson · 開始上課 →Unit 2 · 單元二
Inside the Machine 機器裡面
Open the case: what each part does, what a processor is busy with all day, why there are two kinds of memory, and what happens when you press one key.
打開機殼:每個零件各做什麼、處理器整天在忙什麼、為什麼要有兩種記憶,以及按下一個鍵之後發生了什麼。
What Is Inside a Computer?
打開電腦,裡面有什麼?Take the side off a desktop computer in 3D and pull out its parts one by one: motherboard, processor, memory, storage, graphics card, and power supply. Press the power button and follow the data from part to part.在 3D 裡拿掉桌上型電腦的側板,把零件一個一個拉出來看:主機板、處理器、記憶體、儲存裝置、顯示卡和電源供應器。再按下電源,跟著資料從一個零件走到另一個零件。Start the lesson · 開始上課 →What Does a Processor Do All Day?
處理器整天在忙什麼?Step through a tiny processor in 3D as it fetches an instruction, decodes it, and executes it, again and again. Arrange four instructions to make it add 3 and 4, then predict what each instruction will do.在 3D 裡一步一步看一顆小處理器怎麼拿指令、看懂、照做,然後一再重複。自己排四條指令讓它算出 3+4,再猜猜每一條指令會做什麼。Start the lesson · 開始上課 →Why Does a Computer Need Two Kinds of Memory?
電腦為什麼要有兩種記憶?A desk and a bookcase in 3D: open things, fill the desk, change something without saving, and switch off the power to see what survives. Then sort eight things into memory or storage, and watch what happens when memory fills up.3D 裡的一張書桌和一座書櫃:把東西打開、把桌子放滿、改了不存檔,再把電關掉,看看什麼留得下來。接著把八樣東西分到記憶體或儲存裝置,再看記憶體滿了會怎樣。Start the lesson · 開始上課 →What Happens When You Press a Key?
按下一個鍵,發生了什麼?Follow one key in 3D, from the keyboard, along the cable, through the processor and memory, to the screen. At every stop it is something different: a switch, a key number, a character number, eight bits, and at last a pattern of pixels. Then guess what it is at each stop, sort input from output, and test the keys on your own keyboard.在 3D 裡跟著一個鍵走一趟:從鍵盤出發,沿著線,經過處理器和記憶體,走到螢幕。每一站它都是不一樣的東西:一個開關、一個鍵的編號、一個字元的編號、八個位元,最後是一片像素。接著猜猜它在每一站是什麼、分辨輸入和輸出,再測測自己鍵盤上的鍵。Start the lesson · 開始上課 →Unit 3 · 單元三
Software: Telling the Computer What to Do 軟體:告訴電腦做什麼
What a program is, why one method can be far faster than another, how one processor serves many programs, and how a file can get smaller.
程式是什麼、為什麼同一件事換個方法會快很多、一個處理器怎麼同時服務很多程式,以及檔案為什麼可以變小。
What Is a Program?
程式是什麼?A small robot on a floor of squares does exactly what its program says, one instruction at a time. Watch it walk a staircase in fifteen instructions, then in five. Leave one instruction out and see where it ends up. Then write your own programs for three levels: in order, with a repeat, and with a question.格子地板上的一台小機器人,完全照程式說的做,一次一條指令。看它用十五條指令走一段階梯,再看它只用五條;漏掉一條,看它最後停在哪裡。接著自己寫程式闖三關:照順序、用重複、會問問題。Start the lesson · 開始上課 →What Is an Algorithm?
演算法是什麼?Two rows of closed boxes, one number to find, and two ways to look: open the boxes one by one, or open the middle one and throw away half. Watch both at once and count. Then double the boxes, mix them up, play a number-guessing game, and see what happens with a million boxes.兩排蓋著的箱子、一個要找的數、兩種找法:一個一個打開,或是打開中間那個、把一半丟掉。兩種同時進行,數數看各開了幾個。接著把箱子加倍、把箱子弄亂、玩猜數字,再看看一百萬個箱子會怎樣。Start the lesson · 開始上課 →What Does an Operating System Do?
作業系統在做什麼?One chef, four orders, and a rule: work on one for a moment, then move to the next. Watch the chef take turns in 3D, change how long each turn lasts, and see what it costs to switch. Then tune the turns for three programs so the music never breaks up, and decide which jobs belong to the operating system.一位廚師、四張點單,還有一條規則:每張做一下,就換下一張。在 3D 裡看廚師怎麼輪流,改一改每一輪做多久,看看換手要付出什麼代價。接著替三個程式調出剛好的長短,讓音樂不會斷斷續續,再分辨哪些工作是作業系統的。Start the lesson · 開始上課 →How Can a File Get Smaller?
檔案為什麼可以變小?A wall of 256 colored squares is packed row by row in 3D: squares of the same color in a row join into one bar with a number on it. Watch one picture shrink to a fraction of its size and another grow to twice its size. Then draw your own picture to pack, throw detail away and try to get it back, and decide what must never be lost.在 3D 裡把一面 256 格的彩色方塊牆一列一列壓起來:同一列裡相鄰的同色方塊合成一長條,上面寫著格數。看一張圖縮到原來的幾分之一,另一張卻變成兩倍大。接著自己畫一張圖來壓、把細節丟掉再試著還原,並分辨哪些東西一點都不能少。Start the lesson · 開始上課 →Unit 4 · 單元四
Networks, Security, and AI 連線、安全與 AI
What happens when you open a web page, how a computer keeps a secret, how a computer “learns,” and how computers got so small.
打開一個網頁時發生了什麼、電腦怎麼保守祕密、電腦怎麼「學習」,以及電腦怎麼越變越小。