Everything on Your Computer Is Stored as On-Off Switches
Billions of microscopic switches flip on and off to turn keystrokes, photos, and movies into patterns of ones and zeros.

Fireship · 100+ Computer Science Concepts ExplainedUnder the screen and keyboard, the basic design of a computer is simple. Picture a long strip marked with only two symbols, plus a device that can read the strip and write new marks on it. That strip plus reader is the basic idea behind a computer.
Your laptop works the same way, only much faster and much smaller. At its core is the central processing unit, the chip that does the calculating. Crack one open and you find silicon packed with billions of tiny transistors, which work like microscopic light switches flipped on or off.
The setting of one of those switches is called a bit, the tiniest unit of data a computer handles. One switch alone is not very useful, so bits travel in packs of eight called bytes. A single byte can stand for 256 possibilities, enough to cover every character you type on a keyboard.
That is why letters become numbers. When you press a key, the character is translated into binary numbers using a text standard, a kind of dictionary with names like ASCII and UTF-8. You normally count in base 10, meaning you use ten digits, the way you count on your fingers. Binary counts the same way, but with only the digits one and zero.
Binary is hard for people to read, so programmers often use hexadecimal, a base 16 shorthand. With ten numerals plus six letters, it can neatly stand in for four bits at once, a chunk called a nibble. The code you write in a programming language is eventually converted into machine code, a binary format the chip can decode and run.
Everything a computer stores is patterns of on and off switches. Text, pictures, and video are all long patterns of ones and zeros.
Questions people ask
Why do computers use only ones and zeros?
Because on and off are easy to build reliably. A transistor either lets current through or blocks it, so it is not confused by noise or wear the way a dial with ten positions would be. String enough of those simple choices together, and you can represent any number, letter, or picture.
Why eight bits in a byte?
Eight was a practical compromise that stuck. It is large enough to hold 256 different values, plenty for letters, numbers, punctuation, and control codes, but small enough to keep early hardware simple and cheap. Later systems kept the eight-bit byte as the standard building block.
What is hexadecimal actually used for?
It is a compact way for people to read binary. One hexadecimal digit stands in for exactly four bits, so a byte becomes just two characters instead of eight ones and zeros. Programmers use it to inspect memory, colors, addresses, and machine code without going cross-eyed.