Logo
All chapters
Volume II: Digital Logic  ›  Digital Systems & Binary Numbers

Binary Numbers

Numbers written with only two symbols, 0 and 1 — the language of every digital circuit.

PrevDigital Systems
NextNumber-Base Conversions

Description

A way of writing numbers using only two digits, 0 and 1, where each position is worth a power of two. Electronic switches have two reliable states (off/on). Two symbols map cleanly onto two voltage levels. Multiply each bit by its positional weight (…8, 4, 2, 1) and sum the bits that are 1.

  • Each digit (bit) is multiplied by a power of 2 based on its position.
  • Rightmost bit = 2⁰ = 1; next = 2¹ = 2; then 4, 8, 16, …
  • Example: 1101₂ = 8 + 4 + 0 + 1 = 13₁₀.
  • A wire is easily either low (0) or high (1) — two stable states resist noise.
  • n bits represent 2ⁿ distinct values; 8 bits → 256 values (0–255).
  • Arithmetic uses the same carry rules as decimal, but carries at 2 not 10.
  • What: A way of writing numbers using only two digits, 0 and 1, where each position is worth a power of two.
  • Why: Electronic switches have two reliable states (off/on). Two symbols map cleanly onto two voltage levels.
  • How: Multiply each bit by its positional weight (…8, 4, 2, 1) and sum the bits that are 1.
  • Where: Every register, memory cell, bus, and ALU inside any digital computer or microcontroller.

At a glance

What

A way of writing numbers using only two digits, 0 and 1, where each position is worth a power of two.

Why

Electronic switches have two reliable states (off/on). Two symbols map cleanly onto two voltage levels.

How

Multiply each bit by its positional weight (…8, 4, 2, 1) and sum the bits that are 1.

Where

Every register, memory cell, bus, and ALU inside any digital computer or microcontroller.

When

Whenever data is stored, moved, or computed in hardware — it is the native number format.

Think of it like…

A row of light switches. Each switch is one bit; whether it is ON decides if its 'price tag' (128, 64, 32, …) gets added to the bill. The total bill is the decimal value.

Positional value

  • Each digit (bit) is multiplied by a power of 2 based on its position.
  • Rightmost bit = 2⁰ = 1; next = 2¹ = 2; then 4, 8, 16, …
  • Example: 1101₂ = 8 + 4 + 0 + 1 = 13₁₀.

Why base 2

  • A wire is easily either low (0) or high (1) — two stable states resist noise.
  • n bits represent 2ⁿ distinct values; 8 bits → 256 values (0–255).
  • Arithmetic uses the same carry rules as decimal, but carries at 2 not 10.

Positional weights (8-bit)

Position2⁷2⁶2⁵2⁴2⁰
Weight1286432168421

Sum the weights wherever the bit is 1 to get the decimal value.

Powers of two

n2ⁿCommon name
416nibble range
8256byte
1010241 K
1665,53616-bit word
201,048,5761 M

Decimal → binary place values

▶ live simulator
2^7
0
128
2^6
0
64
2^5
0
32
2^4
0
16
2^3
1
8
2^2
1
4
2^1
0
2
2^0
1
1
13 = 8 + 4 + 1 = 00001101 (binary)

The 5 Whys

  1. 1

    Why binary? Because digital hardware stores information in two-state devices.

  2. 2

    Why two states? Because two well-separated voltage levels are easy to tell apart.

  3. 3

    Why does separation matter? Because real signals pick up noise as they travel.

  4. 4

    Why fear noise? Because a misread level corrupts data and computation.

  5. 5

    Root cause: two symbols give the largest noise margin per wire — reliability is the reason base-2 won.

Cheat sheet

Working principle

  • Multiply each bit by its positional weight (…8, 4, 2, 1) and sum the bits that are 1.
  • A way of writing numbers using only two digits, 0 and 1, where each position is worth a power of two.

Formulas & Boolean expressions

  • Rightmost bit = 2⁰ = 1; next = 2¹ = 2; then 4, 8, 16, …
  • Example: 1101₂ = 8 + 4 + 0 + 1 = 13₁₀.
  • n bits represent 2ⁿ distinct values; 8 bits → 256 values (0–255).

Key facts

  • Each digit (bit) is multiplied by a power of 2 based on its position.
  • A wire is easily either low (0) or high (1) — two stable states resist noise.

Why it exists

  • Root cause: two symbols give the largest noise margin per wire — reliability is the reason base-2 won.
PrevDigital Systems
NextNumber-Base Conversions