Learning Binary (Base 2)

1. What is binary?

Binary is a base‑2 number system. That means it only uses two digits: 0 and 1.

Our usual decimal system is base‑10 and uses digits 0–9. Binary is how computers represent numbers using only two states: off (0) and on (1).

2. Place values in binary

Just like decimal has place values (ones, tens, hundreds…), binary has place values too, but each place is a power of 2 instead of 10.

Bit position 7 6 5 4 3 2 1 0
Power of 2 2⁷ 2⁶ 2⁵ 2⁴ 2⁰
Value 128 64 32 16 8 4 2 1

Each position is called a bit (binary digit). 8 bits together are called a byte.

3. Example: binary to decimal

Binary: 01001010

Line it up with the place values:

Bit position 76543210
Value 1286432168421
Bit 01001010

Only positions with a 1 are added:

64 + 8 + 2 = 74

So 01001010 in binary equals 74 in decimal.

Try it: What is 00010101 in decimal?
Hint: add the values for bits that are 1: 16 + 4 + 1 = 21.

4. Decimal to binary (step‑by‑step)

Example: convert 25 to binary

  1. Write down powers of 2 up to a value ≥ 25: 1, 2, 4, 8, 16, 32 → stop at 32 (too big), so use up to 16.
  2. Find the largest value ≤ 25 → 16 → put 1 in that bit.
  3. 25 − 16 = 9 → next value ≤ 9 is 8 → put 1 there.
  4. 9 − 8 = 1 → next value ≤ 1 is 1 → put 1 there.
  5. All other positions get 0.
Value 168421
Bit 11001

So 25 in decimal is 11001 in binary.

Try it: Convert 13 to binary. Hint: 8 + 4 + 1 = 1301101.

5. Quick reference table

Decimal Binary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
101010
111011
121100
131101
141110
151111

6. Bit, byte, and beyond

Everything in a computer—numbers, text, images, sound—is ultimately broken down into patterns of bits.

7. Mini quiz (self‑check)

  1. What base is binary?
  2. How many values can a single bit represent?
  3. What decimal number is 00001010?
  4. Write 7 in binary.
  5. How many bits are in a byte?

Answers: base 2, two values (0 or 1), 10, 0111, 8 bits.