Number systems and conversions
Introduzido| English | Significado |
|---|---|
| binary/ˈbaɪnəri/ | binário |
| base/beɪs/ | fundamentais |
| denary/ˈdiːnəri/ | decimal |
| hexadecimal/ˌheksəˈdesɪml/ | hexadecimal |
| bit/bɪt/ | bit |
| byte/baɪt/ | byte |
| nibble/ˈnɪbl/ | nibble |
| place value/pleɪs ˈvæljuː/ | valor posicional |
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.

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 半字节.
Sistemas numéricos
byte = Σ place values
Each bit is a power of two — flip the bits and watch decimal and hex update together.
How many bits does one hexadecimal digit represent?
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
One hex digit covers 16 values = a nibble = 4 bits.
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.

Convert binary 10010110 to denary.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
128 + 16 + 4 + 2 = 150.
Convert denary 13 to binary (significant bits only).
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
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.

Convert hexadecimal 1F to denary.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
1 × 16 + 15 = 31 (F is 15).
Why do computer scientists use hexadecimal?
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Hex is just a shorter, human-friendly way to write the same binary value (one digit = 4 bits).
Worked example: 200 in binary and hex
Convert denary 200 to binary and to hexadecimal, then convert hex 3C to denary.
- $200 = 128 + 64 + 8$, so put 1s under 128, 64 and 8:
11001000. Split into nibbles:1100= 12 = C and1000= 8, so 200 = C8 in hex. 3C: the left digit is worth 16s and the right digit 1s. $3 \times 16 + 12 \times 1 = 48 + 12 = 60.$ Check in binary:0011 1100$= 32 + 16 + 8 + 4 = 60.$
Convert hexadecimal 2F to denary.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
$2 \times 16 + 15 = 47$.
What is binary 10101010 in hexadecimal?
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Each nibble 1010 is 10, which is A in hex, so the byte is AA (170 in denary).
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)