๐Ÿ–ฅ๏ธ
๐Ÿ–ฅ๏ธ How Computers Work ยท CS-101 ยท Session 1 of 6

Everything Is Bits

At the very bottom, a computer is millions of tiny switches that are either on or off. Everything else โ€” numbers, text, photos, this page โ€” is built from those two states.

โฑ 8 min read๐Ÿ“… Updated 2026-07-29๐Ÿ“Š Tables, charts & examples

Computers can feel like magic, but underneath they're astonishingly simple: millions of tiny switches, each either on or off. That's it. Every number, word, photo, song and program is ultimately a pattern of these on/off states. This session starts at the very bottom - the bit - and shows how two states are enough to build everything.

๐Ÿ“Œ Worked example
256 from eight switches. Picture eight light switches in a row. Each is on or off - two choices - and because every switch doubles the combinations, eight of them make 2x2x2x2x2x2x2x2 = 256 different patterns. That's a byte, and it's exactly enough to stand for a number from 0 to 255, or a single letter of text. Photos, songs and programs are just enormous rows of these switches. Once you see that 'a byte' is literally eight on/off states, the phrase 'it's all ones and zeros' stops being a cliche and becomes something you can actually picture.

One switch, two states

A bit is a single switch: on or off, which we write as 1 or 0. One bit isn't much - but line several up and the combinations multiply fast.

BitsDifferent patternsCan represent
1 bit2on/off, yes/no
2 bits40-3
8 bits (a byte)2560-255, or one character
32 bits~4 billionbig numbers, colours

Each bit you add doubles the possibilities. Eight bits - a byte - gives 256 combinations, enough for a number 0-255 or a single letter. This doubling is why computers count in powers of two (256, 1024, ...).

Why binary, and how it counts

Computers use binary (base 2) because a switch has two states - on and off are easy to build reliably out of electronics. Counting works just like our everyday numbers, but with only two digits.

๐ŸŽฏ
Binary is just counting with two digits instead of ten. In our normal (base 10) numbers, each place is worth ten times the one to its right (ones, tens, hundreds). In binary, each place is worth two times the one to its right (ones, twos, fours, eights...). So 101010 in binary is 32 + 8 + 2 = 42. That's the whole trick - and the stack's larzbase shows this place-value breakdown for any number, while larzbits lets you see bits being flipped.

The foundation of everything

  • A bit is one switch - on (1) or off (0).
  • More bits = more combinations, doubling with each bit added.
  • Binary is counting with two digits; each place is worth double the last.
  • Everything - numbers, text, images - is built from these bits.

๐Ÿงฉ Do it with LarzOS

Turn this lesson into action with the exact free tools and AI workflows for the job:

๐ŸŽฏ Key takeaways

  • At the bottom, a computer is millions of switches, each on (1) or off (0) - a bit.
  • Each bit added doubles the combinations; 8 bits (a byte) give 256, enough for a character.
  • Binary is just counting with two digits - each place worth double the one to its right.
  • Everything a computer handles is ultimately a pattern of these bits.

Frequently asked

Why do computers use binary instead of our normal base-10 numbers?

It comes down to what's easy and reliable to build physically. A computer is made of electronic components, and it's far simpler and more dependable to make a component that's clearly in one of two states - like a switch that's on or off, or a voltage that's high or low - than one that reliably distinguishes ten different levels. Two states are easy to tell apart even with electrical noise and manufacturing variation, so they're robust. Since the hardware naturally has two states, it makes sense to represent everything with two digits (0 and 1), which is binary. Base 10 feels natural to us because we have ten fingers, but there's nothing special about it for a machine - and building reliable ten-state electronics would be much harder and more error-prone. So binary isn't a limitation the designers were stuck with; it's the sweet spot of simple, reliable and fast.

If it's all just 1s and 0s, how can a computer show a photo or play music?

The key idea is that bits don't mean anything on their own - meaning comes from how we agree to interpret them. The same byte 01000001 might be the number 65, the letter 'A', or part of a colour, depending on the context the program treats it as. For a photo, we agree that the image is a grid of tiny dots (pixels), and each pixel's colour is stored as numbers (how much red, green and blue), which are stored as bits. For music, we measure the sound wave's height thousands of times a second and store each measurement as a number, again as bits. So a photo is millions of colour-numbers and a song is thousands of height-numbers, all encoded in binary. The magic isn't in the bits themselves - it's in the shared conventions (formats) that say 'these bits mean a red pixel' or 'this number is the sound level right now'. The next session goes deeper into how different kinds of data get encoded.

Session 1 of 6 complete

Next up: How Data Is Stored

Continue to Session 2 โ†’

Related lessons

More in this course

Course home → · Browse all courses →