Back to Lingo

Binary

Data Encoding

Binary is a base-2 number system that uses only two digits: 0 and 1. Every piece of data in a computer, from text to images to programs, is ultimately stored and processed as binary. Each binary digit is called a bit, and eight bits grouped together form a byte. Computers use binary because their electronic circuits can easily distinguish between two states: on (1) and off (0).

Why it matters

Understanding binary helps you grasp how computers actually store and manipulate digital information at the lowest level. When you hear terms like "64-bit processor" or see that RGB color values range from 0 to 255, you're encountering binary's influence. The lesson Why Computers Use Binary explains why this two-state system became the foundation of all computing.

How to read binary

In binary, each position represents a power of 2, starting from the right. The binary number 1011 means: (1×8) + (0×4) + (1×2) + (1×1) = 11 in decimal. The binary number 11111111 equals 255, which is why a single byte can represent values from 0 to 255. This is also why RGB color values range from 0 to 255 for each color channel, and why ASCII uses values up to 127.

Where you will see binary

You'll encounter binary when working with file permissions (as flags), network subnet masks, and low-level debugging. The lesson Where Number Systems Are Used covers practical applications including how binary connects to hexadecimal and octal. You can also practice converting between number systems in the Number Base Converter project.

Programmers often use octal (base-8) and hexadecimal (base-16) as shorthand for binary because they convert cleanly. One hexadecimal digit represents exactly four bits, and one octal digit represents exactly three bits. This makes them more human-readable while staying close to the underlying binary.

See more

Further reading

You need to be signed in to leave a comment and join the discussion