Skip to content
Programming

What is Binary code?

Binary is a number system that uses only two digits, 0 and 1. Computers use it because their circuits have two states — on and off — so every piece of data is ultimately stored as binary.

See it, don’t just read it.
Watch a 2-minute lesson with voice + animation that explains binary code.
▶ Watch the visual lesson

Key things to understand

  • 1Each digit is a 'bit'; eight bits make a 'byte'.
  • 2Place values double (1, 2, 4, 8, 16…) instead of the tens of the decimal system.
  • 3All data — text, images, sound — is encoded as binary numbers.
  • 4On/off transistors map naturally to 1 and 0.

Frequently asked questions

Why do computers use binary?
Because electronic circuits reliably represent two states (on/off), which map cleanly to 1 and 0.
How do you count in binary?
Place values double: 1 is 1, 10 is 2, 11 is 3, 100 is 4, and so on.
What is a bit and a byte?
A bit is a single 0 or 1; a byte is eight bits and can represent 256 different values.

Related topics