Converting binary, octal and hex to decimal
Each digit has a weight that is a power of the base. The decimal value is the sum of digit times weight.
Rules
- Value = Σ digit · base^position
- Positions count from the right starting at 0
- Hex: A = 10 to F = 15
Your turn
Three problems on this topic. Spaces don’t matter.
- 1 · To decimal
- 2
- 3
Convert the base 8 number to decimal.
(720)8
Decimal value
Type numbers without a prefix, spaces don’t matter. With a fixed bit width give all the bits.
Worked example
Convert the base 2 number to decimal.
(101101)2
Worked solution
- 11 · 2⁵ + 0 · 2⁴ + 1 · 2³ + 1 · 2² + 0 · 2¹ + 1 · 2⁰
- 2= 45
Typical mistake: Positions count from the right starting at 0: the last digit has weight b⁰ = 1.
Common questions
How do I convert binary to decimal quickly?
Add the weights of all ones: 1, 2, 4, 8, 16 and so on, from the right.
