CH2 · 電腦怎樣交換資料

第 1 / 8 段

這一章到底在講什麼?

CHAPTER 2 · EXCHANGING INFORMATION
一部手機把照片傳到雲端,中間發生了什麼?
📱 → 拆成 0 和 1 → ☁️
換句話說:任何一張照片、一段影片、一句話,
在電腦裡面都只是一串 0 和 1。

這一章只回答四個問題:

① 電腦最小的單位是什麼?→ bit(位元)

② 檔案有多大?→ KB / MB / GB / TB(容量單位)

③ 網路有多快?→ bandwidth 頻寬,單位 bps

④ 傳一個檔案要多久?→ 一條公式:時間 = 檔案大小 × 8 ÷ 頻寬

Four questions, one chapter. Learn these four and the whole chapter is done.

① 一個 bit = 一個開關

A bit is a binary digit — either 0 or 1
燈泡(開關)
01
電腦記下的值
燈亮 = 1  燈滅 = 0

電腦不會「懂」文字,也不會「看」圖片。它裡面只有兩種狀態:通電和斷電,寫成 1 和 0。

一個 0 或一個 1,就是一個 bit(位元)。小寫的 b 是它的縮寫。

A computer is a binary machine. It uses only 0 and 1. One such digit = one bit (abbreviation: small b).

② 八個 bit = 一個 byte = 一個字母

A byte consists of 8 bits, so it can represent 2⁸ = 256 different data
1 bit
8 個格子=
A
One Byte(大寫 B)

一個 bit 只有兩格(0 和 1),實在不夠用。所以電腦把 8 個 bit 綁在一起,叫一個 byte(位元組),縮寫是大寫 B。

8 個格子、每格可以是 0 或 1 → 一共 2⁸ = 256 種組合。剛好夠用來記錄一個數字、一個字母或一個符號。

上面那一串 01000001 就是字母 A。

One byte stores one character. A byte = 8 bits. Abbreviation: capital B. Do not mix up b (bit) and B (byte).

③ 每多一個 bit,可能性就翻一倍

N bits → 2^N different data
N 個 bit → 2^N 種不同資料

2 個 bit:4 種(00、01、10、11)  3 個 bit:8 種  4 個 bit:16 種(2⁴)

8 個 bit:256 種(2⁸)——所以一個 byte 可以代表 256 個不同的字母、數字或符號。

Exam habit: when they ask “how many different data”, answer with 2^N, then calculate.

④ 檔案有多大:KB → MB → GB → TB

Storage units grow by 1024 each step
每一級都是上一級的 1024 倍(不是 1000!)

一個 byte 太小,所以用更大的單位:KB(千位元組)、MB(百萬)、GB(十億)、TB(兆)。

關鍵數字只有一個:每一級都是 1024 倍。
1 KB = 1024 B 1 MB = 1024 KB 1 GB = 1024 MB 1 TB = 1024 GB。

例:一個影片 4 GB,一個 1 TB 硬碟裝得下幾個?
1 TB = 1024 GB → 1024 ÷ 4 = 256 個。

Storage uses 1024 (KB = 2^10 bytes). Remember this number: 1024.

⑤ 網路有多快:bandwidth(頻寬)

Bandwidth = how many bits can pass through in one second (bps)
檔案這邊每秒只放行 2 個 bit對方
已送出 0 個 bit · 經過 0 秒

頻寬(bandwidth)= 每一秒能通過多少個 bit。單位是 bps(bits per second)。

上面閘門寫 2 bps,就是每秒只放 2 個 bit 過去。閘門開得越大(Mbps、Gbps),過得越快。

這裡有一個大陷阱:儲存用 1024(1 KB = 1024 B),但頻寬用 1000(1 Kbps = 1000 bps)。兩邊不要搞混。

bps = bits per second. Kbps = 1000 bps. Storage: 1 KB = 1024 B. Bandwidth: 1 Kbps = 1000 bps.

⑥ 傳一個檔案要多久:一條公式

Time required = file size (in bytes) × 8 ÷ bandwidth (in bps)
例:一個 50 B 的檔案,頻寬 2 bps
已送出 0 / 400 bit · 動畫用了 0 秒

為什麼要 × 8?因為頻寬算的是 bit,而檔案大小寫的是 byte。1 byte = 8 bit,所以要乘 8。

50 B × 8 = 400 bit;400 bit ÷ 2 bps = 200 秒。

三個步驟:① 把檔案換成 bit(×8)② 單位對齊(K 對 K、M 對 M)③ 除以頻寬,答案要寫單位。

Time = size × 8 ÷ bandwidth. Remark from the book: always write down the unit of time.

⑦ 考試就考這三種算式

Cancel the shared prefix, × 8, then divide — and write the unit

看哪三個字:KB 對 Kbps(K 一起約掉)、MB 對 Mbps(M 約掉)、GB 對 Gbps(G 約掉)。只有前綴不同時(MB 對 Kbps),才要先 ×1024。

512 KB ÷ 64 Kbps → 512 × 8 ÷ 64 = 64 s
48 MB ÷ 24 Mbps → 48 × 8 ÷ 24 = 16 s
2 MB ÷ 64 Kbps → 2 × 1024 × 8 ÷ 64 = 256 s

看完一段再按「下一段」。想重看,按「重播本段」。