Binary
In computing, binary means a base-2 representation built around two possible states, commonly written as 0 and 1.
Binary is foundational to how computers represent data, perform logic, and store or transmit low-level information.
What it does
Binary provides the two-state representation used throughout digital systems.
It is commonly used to:
- Represent numbers in base 2
- Store data as bits and bytes
- Express true/false logic states
- Encode files, machine instructions, and low-level values
- Distinguish between text data and non-text binary data
Core concepts
Two-state representation
Binary is based on only two values.
In digital systems, those values are often modeled as on/off, true/false, or 1/0.
Binary numbers
A binary number uses only the digits 0 and 1.
That is the numeric form most directly aligned with digital hardware.
Binary data
In software, binary can also describe data that is stored in raw machine-readable form rather than as plain text.
That is why people talk about binary files, binary protocols, or compiled binaries.
Common use cases
- Numeric representation inside computers
- Boolean and logical operations
- Executable program files
- Encoded media and file formats
- Low-level networking and storage systems
Practical notes
- Binary is broader than just binary numbers; it also describes how digital systems represent and process data.
- The smallest common unit is the bit, which holds one binary state.
- A boolean value is one simple logical concept built around the same two-state idea.
- Many software tools distinguish between text data and binary data because they are processed differently.
Sources Used
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#binary
- https://developer.mozilla.org/en-US/docs/Glossary/Base64
Frequently Asked Questions
Is binary just 0 and 1?
At the representation level, yes. Binary is built around two possible states, commonly written as 0 and 1.
Is binary only about numbers?
No. It is also used more broadly for data representation, file formats, logic, and machine-level storage.
Is a boolean binary?
A boolean is a logical two-state value, so it fits naturally into binary thinking.