Technology & Computing · Computers & hardware

Binary, bits and bytes

Everything a computer holds is a pattern of on and off. Learn to count in binary, see what bits and bytes are, and find out why one pattern can be a number, a letter or a shade.

4 short lessons · about 16 minutes · 7 sources · updated November 2026

What you will learn

  • Explain place value in base two, where each place is worth double the one to its right
  • Convert small numbers between binary and decimal
  • Explain what a bit and a byte are and why eight bits give 256 patterns
  • Explain why a drive sold as 1 TB shows up as about 931 GB in Windows

Lesson 1 of 4 · 4 min

Counting with only 0 and 1

Before you readIn binary, the number system computers use, what does the numeral 10 stand for?

Correct.Not quite. The answer is Two.

In binary, 10 means two, one two and no ones. The lesson shows why each place is worth double the one to its right.

A computer chip holds millions or billions of transistors, tiny switches that are either off or on. Engineers write off as 0 and on as 1. A digit that can only be 0 or 1 is a bit, short for binary digit.

Two states are simple to build into circuits, so almost every modern computer uses binary, the number system with only two digits. But how do you write 5 with just 0 and 1?

The same way you write 347. In place value, a digit's position sets its worth. In 347 the 3 is worth 300, because each place is worth ten times the place to its right.

Binary uses the same trick with doubling. From the right, the places are worth 1, 2, 4, 8, 16 and so on. A 1 means count this place, and a 0 means skip it. So 101 is one 4, no 2s and one 1, which makes 5.

Counting follows from this. In decimal, after 9 a place rolls back to 0 and the next place goes up. In binary that happens after 1. So you count 0, 1, 10, 11, 100, 101.

Check yourselfIn binary, why is the third place from the right worth 4?

Correct.Not quite. The answer is Each place is double the last.

Binary places go 1, 2, 4, 8, doubling each time. Adding two would give 1, 3, 5, and squaring would leave 1 stuck at 1.

To read a binary number, write the place values above its digits and add the places that hold a 1. Take 1101. From the right the places are 1, 2, 4 and 8. The 1s sit under 8, 4 and 1, so 1101 is 13.

To write a number in binary, go the other way. Take the largest place that fits, mark a 1 and subtract it. Repeat with what's left. For 11, take 8, leaving 3. Skip 4, take 2, then take 1. That gives 1011.

Each extra digit doubles how far you can count. Use your fingers as bits, up for 1 and down for 0. One hand reaches 31, and two hands reach 1,023.

Try to recallHow would you work out what the binary number 10110 means in decimal?

Write the place values 16, 8, 4, 2 and 1 above the digits from left to right. Add the places that hold a 1, which are 16, 4 and 2. So 10110 is 22.

Binary is place value with doubling. You can read a binary number by adding the places that hold a 1, and write one by taking the largest place that fits.

Lessons in this topic

  1. Counting with only 0 and 1

    Learn how place value works with two digits instead of ten, and read and write small binary numbers yourself.

    Essentials · 4 min

  2. Bits, bytes and the case of the shrinking drive

    See why eight bits make a byte with 256 patterns, and why a new 1 TB drive shows up as about 931 GB.

    Essentials · 4 min

  3. One pattern, many meanings

    Read the same byte as a number, a letter and a shade of grey, and see why every file needs a format to make sense.

    Deeper · 4 min

  4. Hex codes and how computers store a minus sign

    See why programmers write bytes in base 16, and how two's complement lets plain bits hold negative numbers.

    Deeper · 4 min

Three quick stories from this topic

Why byte has a y

Byte is spelled with a y so nobody would confuse it with bit

Werner Buchholz coined the word in June 1956 while designing IBM's Stretch computer. He respelled bite on purpose, so a dropped letter couldn't quietly turn it into bit.

Not always eight

Early bytes came in different sizes. Eight bits became the norm after IBM's System/360 and the microprocessors of the 1970s.

Bit is older

John Tukey shortened binary digit to bit in a 1947 Bell Labs memo, and Claude Shannon put it in print in 1948.

Counting to 1,023 by hand

Your ten fingers can count to 1,023 if you use them as binary digits

Each finger is a bit, up for 1 and down for 0, worth 1, 2, 4 and so on up to 512. Raise all ten and the values add up to 1,023. One hand alone reaches 31.

Why it works

Each finger is worth double the one before it, so ten fingers cover every whole number from 0 to 1,023.

In computer terms

Ten fingers hold one and a quarter bytes this way, against less than half a byte when you count to 10 the usual way.

Gangnam Style's view count

YouTube said Gangnam Style passed the 2,147,483,647 views its counter could hold

That's the largest number a signed 32-bit integer can store. In December 2014 YouTube said it had moved the counter to 64 bits, adding that it never expected a video to pass that number.

Why that number

A signed 32-bit number spends its leftmost bit on negatives, so the top is 2 to the power 31, minus one.

Room to grow

A 64-bit counter can go past nine quintillion views, more than a billion for every person alive.

Sources

  • How processors execute instructions

    Follow a tiny calculation through the instructions, memory addresses and circuits that make a computer work.

    4 lessons · 22 min

  • Why adding cores stops helping

    A fixed job has a part that won't split, and that part sets a ceiling no number of processors can lift.

    4 lessons · 24 min

  • The parts of a computer

    Open up a laptop or a phone and name what you find. See what the processor, memory, storage and the input and output parts each do, and how they work together when you open a file.

    4 lessons · 16 min

  • Passwords, passkeys and account security

    See how passwords get stolen, how a passkey signs you in with nothing to steal, and why account recovery needs as much care as sign-in.

    4 lessons · 17 min

  • What artificial intelligence is

    AI is one label for many machines, from spam filters to chatbots. See what they share, how learned systems differ from hand-written rules, and how to test a claim about what AI can do.

    4 lessons · 16 min

  • How machine learning works

    A machine-learning system isn't given the rules. It's shown examples and adjusts itself until its guesses improve. See how training works, why a model can ace its lessons and fail in the world, and how it's tested.

    4 lessons · 16 min

All technology & computing topics · Take the quiz