SECTION 05 / 8

Binary Numbers and Place Value

4 min read
On this page 11 headings

Start here One light bulb can show only two things: off or on. Two bulbs can show four patterns. Three bulbs, eight. With enough bulbs you can show any number. A computer is just a huge row of “bulbs” (bits).

More than two values: use more bits

One bit gives only 2 values (0 and 1). To show more, put bits side by side:

Each extra bit doubles the number of patterns.
Each extra bit doubles the number of patterns.
Open image ↗
Bits and patterns
Bits Patterns Count
1 0, 1 2
2 00, 01, 10, 11 4
3 000, 001, 010, 011, 100, 101, 110, 111 8
n … 2ⁿ

Rule: n bits give 2ⁿ different values.

Place value: decimal (base 10)

You already know this. In 329, each place is worth 10 times the place to its right:

329 = 3×100 + 2×10 + 9×1 = 3×10² + 2×10¹ + 9×10⁰

Place value: binary (base 2)

Binary works the same way, but each place is worth 2 times the place to its right:

Decimal places go 1, 10, 100… Binary places go 1, 2, 4, 8, 16…
Decimal places go 1, 10, 100… Binary places go 1, 2, 4, 8, 16…
Open image ↗
Place values

101 in binary = 1×4 + 0×2 + 1×1 = 5

Binary place values (right to left): 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024…

Tip: write the base as a small subscript when it could be confusing: 101₂ = 5₁₀.

The binary digital system, summed up

  • A digital system uses a limited set of values.
  • A binary system uses two: 0 and 1, held as low and high voltages.
  • Groups of bits represent bigger numbers, letters, colours, anything.

In one line: n bits give 2ⁿ values, and binary place values double from right to left (1, 2, 4, 8, …), just as decimal places multiply by 10. Exam words: bit, binary (base 2), decimal (base 10), place value, positional number system, 2ⁿ, least significant bit (LSB, rightmost), most significant bit (MSB, leftmost).


How to solve: the four common question types

Type 1: How many values can n bits show?

Steps: answer = 2ⁿ. Example: 5 bits → 2⁵ = 32 values (0 to 31). Trap: the biggest number is 2ⁿ − 1, not 2ⁿ, because we start from 0.

Type 2: How many bits do I need for N different things?

Steps: find the smallest n with 2n≥N2^{n} \ge N. Example: 26 letters. 2⁴ = 16 (too small), 2⁵ = 32 ≥ 26 → 5 bits. Trap: N=32N = 3 2 needs 5 bits, but N=33N = 3 3 needs 6.

You’ll see this again in sequential circuits: “A system has 64 states. Are 6 flip-flops enough?” Each flip-flop stores 1 bit, so n flip-flops give 2ⁿ states. 2⁶ = 64 → yes. 65 states would need 7.

Type 3: Binary → decimal

Steps:

  1. Write the place values over each bit, starting with 1 on the right.
  2. Add the place values where the bit is 1.

Example: 110101₂

Place value 32 16 8 4 2 1
Bit 1 1 0 1 0 1

32 + 16 + 4 + 1 = 53

Type 4: Decimal → binary

Method A, keep dividing by 2:

  1. Divide by 2 and write down the remainder (0 or 1).
  2. Divide the answer by 2 again, and keep going until you reach 0.
  3. Read the remainders from bottom to top.

Example: 13

Divide Answer Remainder
13 ÷ 2 6 1
6 ÷ 2 3 0
3 ÷ 2 1 1
1 ÷ 2 0 1

Read bottom to top: 1101₂. Check: 8 + 4 + 0 + 1 = 13 ✓

Method B, take away the biggest place values: 13 → largest place value ≤ 13 is 8 (left 5) → 4 fits (left 1) → 2 doesn’t fit → 1 fits (left 0). So the places are 8, 4, 1 → 1101₂.

Trap: in Method A, reading the remainders top to bottom gives the number backwards.

Try these

  1. How many values can 8 bits show? What’s the largest?
2⁸ = 256 values; largest = 255.
  1. How many bits are needed to give a unique code to 100 students?
2⁶ = 64 < 100 ≤ 128 = 2⁷, so 7 bits.
  1. Convert 1011011₂ to decimal.
64 + 16 + 8 + 2 + 1 = 91.
  1. Convert 45 to binary.
45 = 32 + 8 + 4 + 1 → 101101₂.

Quick check

What is each binary place worth compared with the one to its right? Twice as much.
What does 2ⁿ tell you? How many different values n bits can represent.
What is 1000₂ in decimal? 8.
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑