Number systems and conversions · 数字系统与转换
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| binary/ˈbaɪnəri/ | 二进制 | èr jìn zhì |
| base/beɪs/ | 基数 | jī shù |
| denary/ˈdiːnəri/ | 十进制 | shí jìn zhì |
| hexadecimal/ˌheksəˈdesɪml/ | 十六进制 | shí liù jìn zhì |
| bit/bɪt/ | 位 | wèi |
| byte/baɪt/ | 字节 | zì jié |
| nibble/ˈnɪbl/ | 半字节 | bàn zì jié |
| place value/pleɪs ˈvæljuː/ | 位值 | wèi zhí |
Why computers use binary 二进制
- A computer only has two states: on and off, written 1 and 0.
- A two-digit system is binary (base 基数 2) — and all data must become binary first.
- We use three number systems to work with it.
为什么计算机使用二进制
- 一台计算机只有两种状态:开和关,写作 1 和 0。
- 一个两位数字的系统是二进制(binary,基数 2)——而所有数据必须先变成二进制。
- 我们用三个数字系统来处理它。
The three number systems
| System | Base | Digits |
|---|---|---|
| Denary 十进制 | 10 | 0–9 |
| Binary | 2 | 0 and 1 |
| Hexadecimal 十六进制 | 16 | 0–9 then A–F |
- The base is how many digits a system uses. Hex's A–F stand for 10–15.
- A bit 位 is one 0 or 1; 8 bits = 1 byte 字节; 4 bits = 1 nibble 半字节.
Adding two 8-bit numbers column by column; carries ripple to the left. 118 + 48 = 166.
三个数字系统
| 系统 | 基数 | 数字 |
|---|---|---|
| 十进制 | 10 | 0–9 |
| 二进制 | 2 | 0 和 1 |
| 十六进制 | 16 | 0–9 然后 A–F |
- 基数(base)是一个系统使用多少个数字。十六进制的 A–F 代表 10–15。
- 一个位(bit)是一个 0 或 1;8 位 = 1 字节(byte);4 位 = 1 半字节(nibble)。

逐列相加两个 8 位数;进位向左涟漪。118 + 48 = 166。
Number systems · 数字系统
byte = Σ place values · 字节 = Σ 位值
Each bit is a power of two — flip the bits and watch decimal and hex update together. · 每一位是 2 的一个幂——翻转这些位,看十进制和十六进制一起更新。
How many bits does one hexadecimal digit represent? · 一个十六进制数字表示多少位?
One hex digit covers 16 values = a nibble = 4 bits. · 一个十六进制数字涵盖 16 个值 = 一个半字节 = 4 位。
Place value 位值 and binary ↔ denary
- In binary the place values double right to left. For 8 bits:
128 64 32 16 8 4 2 1. - Denary → binary: put a 1 under each value you need so they sum to your number. $150 = 128+16+4+2$ →
10010110. - Binary → denary: add the place values where there's a 1.
A microprocessor holds millions of tiny transistors, each a switch that is on (1) or off (0).
位值与二进制 ↔ 十进制
- 在二进制中位值从右到左翻倍。对 8 位:
128 64 32 16 8 4 2 1。 - 十进制 → 二进制:在你需要的每个值下放一个 1,使它们相加得到你的数。$150 = 128+16+4+2$ →
10010110。 - 二进制 → 十进制:把有 1 的地方的位值相加。

一个微处理器容纳数百万个微小的晶体管,每个是一个开(1)或关(0)的开关。
Convert binary 10010110 to denary. · 把二进制 10010110 转换为十进制。
128 + 16 + 4 + 2 = 150. · 128 + 16 + 4 + 2 = 150。
Convert denary 13 to binary (significant bits only). · 把十进制 13 转换为二进制(仅有效位)。
13 = 8 + 4 + 1 → 1101. · 13 = 8 + 4 + 1 → 1101。
Hexadecimal and why we use it
- Hex → binary: each hex digit becomes its own nibble (4 bits).
F08→1111 0000 1000. - Binary → hex: group bits into nibbles from the right; each nibble is one hex digit.
- Why hex? it is shorter than binary and easier to read, so fewer mistakes — used for MAC/IPv6 addresses, HTML colours (
#FF0000), and memory addresses.
A bitmap image is a grid of pixels; the resolution is the number of pixels (here 8 by 8).
十六进制以及我们为什么使用它
- 十六进制 → 二进制:每个十六进制数字变成它自己的半字节(4 位)。
F08→1111 0000 1000。 - 二进制 → 十六进制:从右边把位分组成半字节;每个半字节是一个十六进制数字。
- 为什么用十六进制? 它比二进制更短且更易读,所以错误更少——用于 MAC/IPv6 地址、HTML 颜色(
#FF0000)和内存地址。

一个位图图像是一个像素网格;分辨率是像素的数量(这里是 8 乘 8)。
Convert hexadecimal 1F to denary. · 把十六进制 1F 转换为十进制。
1 × 16 + 15 = 31 (F is 15). · 1 × 16 + 15 = 31(F 是 15)。
Why do computer scientists use hexadecimal? · 计算机科学家为什么使用十六进制?
Hex is just a shorter, human-friendly way to write the same binary value (one digit = 4 bits). · 十六进制只是写同样二进制值的一种更短、对人友好的方式(一个数字 = 4 位)。
You've got it
- binary base 2 (bit · byte = 8 bits · nibble = 4 bits); hex base 16, one digit = 4 bits
- denary → binary: pick the powers of 2 that sum to the number
- binary → hex by grouping nibbles
- hex is a shorter, readable way to write the same binary (addresses, colours)
你掌握了
- 二进制基数 2(位 · 字节 = 8 位 · 半字节 = 4 位);十六进制基数 16,一个数字 = 4 位
- 十进制 → 二进制:挑出相加得到该数的那些 2 的幂
- 二进制 → 十六进制通过分组半字节
- 十六进制是写同样二进制的一种更短、更易读的方式(地址、颜色)