The Binary Number System Explained: How Computers Use 0s and 1s
The binary number system uses only two digits — 0 and 1 — to represent every value a computer stores or processes. This guide explains how binary works, how to convert between binary and decimal, how binary arithmetic operates, and why computers rely on binary at the hardware level.
What Is the Binary Number System?
The binary number system is a base-2 positional numeral system that uses exactly 2 symbols: 0 and 1. Each symbol is called a bit (binary digit). All data inside a computer — text, images, audio, programs — is ultimately stored and processed as sequences of 0s and 1s.
Binary contrasts with the decimal system, which is base-10 and uses digits 0 through 9. Binary is base-2 because each position represents a power of 2, not a power of 10.
Why Do Computers Use Binary?
Computers use binary because transistors — the fundamental switching components in CPUs and memory chips — have exactly 2 stable electrical states: on (high voltage, represented as 1) and off (low voltage, represented as 0).
A modern CPU contains between 5 billion and 100 billion transistors. Each transistor reliably holds one of two voltage states.
Using a two-state system eliminates ambiguity: a signal is either above the threshold (1) or below it (0). Multi-state systems are physically unreliable at nanometer scale and introduce error rates that make computation impractical.
Boolean algebra — the mathematical foundation of digital logic — also operates on two values: true and false. Binary maps directly to Boolean logic, which enables CPUs to perform logical operations (AND, OR, NOT, XOR) using the same transistor circuits used for arithmetic.
How Does Positional Notation Work in Binary?
In binary, each bit position represents a specific power of 2, starting from 2⁰ = 1 at the rightmost position and doubling with each position to the left.
The positional values for an 8-bit number (one byte), from left to right:
- Bit 7 (leftmost): 2⁷ = 128
- Bit 6: 2⁶ = 64
- Bit 5: 2⁵ = 32
- Bit 4: 2⁴ = 16
- Bit 3: 2³ = 8
- Bit 2: 2² = 4
- Bit 1: 2¹ = 2
- Bit 0 (rightmost): 2⁰ = 1
The maximum value stored in 8 bits is 11111111 binary = 255 decimal (sum: 128+64+32+16+8+4+2+1).
How to Convert Binary to Decimal
To convert binary to decimal, multiply each bit by its positional power of 2, then sum the results.
Example 1: Convert 1101 binary to decimal.
- Position 3 (leftmost): 1 × 2³ = 1 × 8 = 8
- Position 2: 1 × 2² = 1 × 4 = 4
- Position 1: 0 × 2¹ = 0 × 2 = 0
- Position 0 (rightmost): 1 × 2⁰ = 1 × 1 = 1
- Sum: 8 + 4 + 0 + 1 = 13
1101 binary = 13 decimal.
Example 2: Convert 10110101 binary to decimal.
128 + 0 + 32 + 16 + 0 + 4 + 0 + 1 = 181 decimal.
How to Convert Decimal to Binary
To convert decimal to binary, repeatedly divide by 2 and record the remainders. Read remainders from bottom to top.

Example: Convert 45 decimal to binary.
- 45 ÷ 2 = 22 remainder 1
- 22 ÷ 2 = 11 remainder 0
- 11 ÷ 2 = 5 remainder 1
- 5 ÷ 2 = 2 remainder 1
- 2 ÷ 2 = 1 remainder 0
- 1 ÷ 2 = 0 remainder 1
Reading remainders from bottom to top: 45 decimal = 101101 binary.
How Does Binary Addition Work?
Binary addition follows 4 rules:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 10 (0, carry 1)
Example: Add 1011 (11 decimal) + 0110 (6 decimal).
Column-by-column from right to left: 1+0=1, 1+1=10 (write 0 carry 1), 0+1+1(carry)=10 (write 0 carry 1), 1+0+1(carry)=10 (write 0 carry 1). Result: 10001 binary = 17 decimal.
How Are Negative Numbers Represented in Binary?
Most computer systems represent negative integers using two’s complement. Two’s complement allows addition and subtraction to use the same hardware circuit.
To find the two’s complement of a binary number:
- Invert all bits (flip every 0 to 1 and every 1 to 0). This is the one’s complement.
- Add 1 to the result.
Example: Represent −13 in 8-bit two’s complement.
+13 in binary: 00001101. Invert: 11110010. Add 1: 11110011.
This is −13 in 8-bit two’s complement. The leftmost bit (1) signals a negative number.
In an 8-bit signed integer, the range is −128 to +127. Bit 7 (value 128) is the sign bit — when set to 1, the value is negative.
How Does Binary Represent Text?
Binary represents text through character encoding standards that map each character to a numeric value, which is then stored as a binary number.
In ASCII (American Standard Code for Information Interchange), the letter A has the decimal value 65, which is 01000001 in binary. The letter B = 66 = 01000010. Lowercase a = 97 = 01100001.
Unicode extends this to cover 149,813 characters. The letter A still maps to 65 in Unicode, maintaining backward compatibility with ASCII.
How Is Binary Used in Memory Addressing?
Binary directly determines how much memory a processor can address. A 32-bit address bus can reference 2³² = 4,294,967,296 unique memory locations, which equals 4 GB of addressable RAM. A 64-bit address bus can theoretically address 2⁶⁴ bytes = 18.4 exabytes, though current hardware limits this to 256 TB in practice.

Each memory address is a binary number. The CPU sends binary address values on the address bus to select which memory cell to read from or write to.
Binary vs Decimal vs Hexadecimal: Place Value Comparison
| Position | Binary (Base-2) Value | Decimal (Base-10) Value | Hex (Base-16) Value |
|---|---|---|---|
| Position 0 | 2⁰ = 1 | 10⁰ = 1 | 16⁰ = 1 |
| Position 1 | 2¹ = 2 | 10¹ = 10 | 16¹ = 16 |
| Position 2 | 2² = 4 | 10² = 100 | 16² = 256 |
| Position 3 | 2³ = 8 | 10³ = 1,000 | 16³ = 4,096 |
| Position 4 | 2⁴ = 16 | 10⁴ = 10,000 | 16⁴ = 65,536 |
| Position 7 | 2⁷ = 128 | 10⁷ = 10,000,000 | 16⁷ = 268,435,456 |
Key Takeaways
- Binary is a base-2 number system using only 0 and 1; each digit represents a power of 2.
- Computers use binary because transistors have exactly 2 stable electrical states: on and off.
- To convert binary to decimal: multiply each bit by its power of 2 and sum the products.
- To convert decimal to binary: divide repeatedly by 2 and read remainders from bottom to top.
- Negative numbers use two’s complement representation in most computer systems.
- The letter A in ASCII is decimal 65 = binary 01000001.
Frequently Asked Questions
What is binary in simple terms?
Binary is a number system that uses only 0 and 1. Computers use it because transistors have two electrical states: on (1) and off (0). All data — text, images, programs — reduces to sequences of 0s and 1s.
What is 1101 in binary as a decimal number?
1101 binary equals 13 decimal. Calculation: 1×8 + 1×4 + 0×2 + 1×1 = 8 + 4 + 0 + 1 = 13.
How many values can 8 bits hold?
8 bits can hold 256 unique values (2⁸ = 256), ranging from 0 to 255 in unsigned representation, or −128 to +127 in signed two’s complement.
Why is binary used instead of decimal in computers?
Binary maps directly to transistor states (on/off). Decimal would require 10 distinct voltage levels per digit, making circuits physically unreliable at nanometer scale. Two-state circuits are faster and less error-prone.
What is two’s complement?
Two’s complement is a binary method for representing negative integers. To negate a number: invert all bits, then add 1. It allows the CPU to perform both addition and subtraction with one circuit.
Last Thoughts on the Binary Number System
Binary is the native language of all digital hardware. Every number, character, image, and instruction processed by a CPU exists as a sequence of 0s and 1s, mapped to transistor states. Mastering binary-to-decimal conversion, binary arithmetic, and two’s complement notation is foundational to understanding memory addressing, data types, and low-level programming.


