Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How Computers Talk (Digital Data)

Have you ever wondered how a computer remembers your favorite picture or the high score in your game? It doesn’t use words or colors like we do. Instead, computers use something much simpler: Numbers!

The Language of On and Off

Inside a computer, everything is made of billions of tiny electronic switches called transistors. These switches are like the light switches in your house, but much, much smaller. They can only be in two states:

  • ON (Represented by the number 1)
  • OFF (Represented by the number 0)

Because there are only two choices (0 or 1), we call this system Binary. The word “bi” means two, just like a bicycle has two wheels!

Bits and Bytes

  • Bit: A single 1 or 0 is called a “bit.” It is the smallest piece of information a computer can understand.
  • Byte: When you put 8 bits together in a row, it’s called a “byte.”

Think of it like LEGO bricks. One tiny bit is like a single stud. When you snap 8 of them together, you have a bigger brick (a byte) that can start to represent something useful.

Example:

  • 1 bit: Can tell you if a light is ON or OFF.
  • 1 byte: Can represent a single letter, like ‘A’ or ‘B’.

Software Byte

Everything is a Number

Even though computers only see 1s and 0s, they can combine them to represent everything else:

  • Letters: There is a special “codebook” (like ASCII or Unicode) that tells the computer which byte represents which letter. For example, the code 01000001 is the letter A.
  • Colors: Computers create colors by mixing Red, Green, and Blue light. Each color gets its own number. A bright red might be 255 in decimal, which looks like 11111111 in binary!
  • Pictures: A photo is just thousands of tiny dots called pixels. Each pixel has its own binary code that tells the computer exactly what color it should be.

Letter Codes (a-z)

Here is how a computer sees the lowercase letters of the alphabet:

LetterDecimalBinary
a9701100001
b9801100010
c9901100011
d10001100100
e10101100101
f10201100110
g10301100111
h10401101000
i10501101001
j10601101010
k10701101011
l10801101100
m10901101101
n11001101110
o11101101111
p11201110000
q11301110001
r11401110010
s11501110011
t11601110100
u11701110101
v11801110110
w11901110111
x12001111000
y12101111001
z12201111010

Counting Like a Computer

We usually count using ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). This is called Decimal. But since computers only have two “fingers” (0 and 1), they count differently.

Imagine you have three light bulbs.

  • If all are off (000), that’s 0.
  • If the first one is on (001), that’s 1.
  • If the second one is on (010), that’s 2.
  • If the first and second are on (011), that’s 3.

By using enough bits, a computer can count as high as it needs to!

Did you know?

  • The first “Bit”: The word “bit” stands for Binary Digit. It was first used by a scientist named Claude Shannon in 1948.
  • Binary is Old: Even though computers are modern, the idea of binary was developed by a mathematician named Gottfried Wilhelm Leibniz way back in 1689!
  • Punch Cards: Long ago, before screens and keyboards, people “talked” to computers by punching holes in paper cards. A hole meant “1” and no hole meant “0”.

Check Your Knowledge

  1. Why do computers use Binary (0s and 1s) instead of human words?
  2. If you have 8 bits, what is that group called?
  3. What is a “pixel,” and how does a computer know what color it should be?
  4. How many different patterns can you make with just 2 bits? (Try writing them down!)