Number Systems
Topics
- Decimal
- Binary
- Conversion between decimal and binary
- Other bases
Decimal
- Or base-10 number
- Usually used in normal life.
- Each place has 10 posible numbers (0, 1, 2, ..., 9).
- The weight of n-th place is
10^{n-1}
10n−1
Example
231 = 2\cdot10^2 + 3\cdot10^1 + 1\cdot10^0
231=2⋅102+3⋅101+1⋅100
= 2\cdot100 + 3\cdot10 + 1\cdot1
=2⋅100+3⋅10+1⋅1
= 200 + 30 + 1
=200+30+1
binary
- Or base-2 number
- Usually used in digtal sytems (including digital computer).
- Each place has 2 posible numbers (0 and 1).
- The weight of n-th place is
2^{n-1}
2n−1
Example
1101_2 = 1\cdot2^3 + 1\cdot2^2 + 0\cdot2^1 + 1\cdot2^0
11012=1⋅23+1⋅22+0⋅21+1⋅20
= 1\cdot8 + 1\cdot4 + 0\cdot2 + 1\cdot1
=1⋅8+1⋅4+0⋅2+1⋅1
= 8 + 4 + 0 + 1
=8+4+0+1
The Conversion
Decimal to binary
101100101_2
1011001012
The conversion
Binary to decimal
1101_2 = 1\cdot2^3 + 1\cdot2^2 + 0\cdot2^1 + 1\cdot2^0
11012=1⋅23+1⋅22+0⋅21+1⋅20
= 1\cdot8 + 1\cdot4 + 0\cdot2 + 1\cdot1
=1⋅8+1⋅4+0⋅2+1⋅1
= 8 + 4 + 0 + 1
=8+4+0+1
= 13
=13
Other bases
octal
- Or base-8 number
- Used represent base-2 number for short.
- Each place has 8 posible numbers (0, 1, 2, ..., 7).
- The weight of n-th place is
8^{n-1}
8n−1
using octal to represent the binary
hexadecimal
- Or base-16 number
- Used represent base-2 number for short (shorter than octal).
- Each place has 10 posible numbers (0, 1, 2, ..., 9) and 6 possible alphabets (A, B, C, ..., F)
- The weight of n-th place is
16^{n-1}
16n−1
using hexadecimal to represent binary
thanks
for your
Attention
Number Bases
By whcwhc78
Number Bases
- 516