Introduction to Binary
Binary is the foundation of how computers represent and process information. Binary uses only two digits, 0 and 1, to represent all data and programs and to execute all logic. For example:
- The letter A can be represented as 1000001
- The number 22 can be represented in binary as 10110
- The color red in a bitmap image can be represented as 11111111 00000000 00000000
Computers use binary for 4 main reasons
- Reliability when handling unstable electrical signals
- Ease of storage on HDDs and Optical Drives
- Simplicity in performing mathematical operations
- Ease of wiring with electrical circuits for logic
How many digits are used in the binary system?
Reason 1: Reliability
Analog signals encode information in continuous variations (many possible values). Noise and interference change those shapes and can easily cause mistaken readings. Binary reduces the decision to a simple high/low test, which tolerates much more noise before a bit flips — increasing reliability over imperfect channels.
Receivers only need to decide on or off (high/low). This demo compares an analog-style waveform with a binary pulse train under noise and interference.
Reason 2: Ease of Storage
Storing data in binary is straightforward. It doesn't require converting between different formats, making it easy to store data reliably on various media, such as punch cards, CDs, DVDs, and magnetic hard disks.
For example, this is a closeup of a CD surface, showing the data encoded onto the surface of the disk:

Reason 3: Efficiency with Electrical Circuits
Binary aligns perfectly with electrical circuits, where "on" represents a closed circuit, and "off" represents an open circuit. This simplicity is crucial for the speed and efficiency of computers, which use transistors and logic gates to perform complex calculations.
Here is the logic gate needed to add two binary numbers together, called a binary adder: You can see how this logic gate works in this video:

What is a key advantage of using binary representation in computers?
Reason 4: Mathematical Operations
Binary allows computers to perform mathematical operations efficiently, especially when dealing with powers of 2, like doubling or halving values. Shifting binary digits left or right can quickly achieve these operations.
For example:
Left shift (<<) moves all bits one place to the left, effectively doubling the number.
0001 (1 in decimal) → 0010 (2 in decimal)
0011 (3 in decimal) → 0110 (6 in decimal)
Right shift (>>) moves all bits one place to the right, effectively halving the number.
1000 (8 in decimal) → 0100 (4 in decimal)
0110 (6 in decimal) → 0011 (3 in decimal)
Because these shifts involve simple bit movements rather than full arithmetic calculations, computers can perform them extremely fast — one of the key advantages of using binary representation for data and computations.
Bits, Nibbles, and Bytes
Bits (e.g. 0)
In binary, the smallest unit of information is called a "bit" (short for "binary digit"). A bit can represent either a 0 or a 1. It's the basic building block of all digital data.
Nibbles (e.g. 1001)
A "nibble" is a unit of information consisting of four bits. Since each bit can have two possible values (0 or 1), there are a total of 16 possible combinations of four bits (2^4 = 16). Therefore, a nibble can represent any number from 0 to 15.
Bytes (e.g. 10001001)
A "byte" is a unit of information consisting of eight bits. With eight bits, there are 256 possible combinations (2^8 = 256), allowing for the representation of numbers from 0 to 255Binary
How many bits are there in one byte?
Special Encodings
Some numbers can't easily be represented in binary and need special attention.
Negative numbers ( e.g. -5)
Usually represented using Two's Complement binary
Real numbers ( e.g. 3.142)
Any number with a decimal place is usually represented using floating point binary.
Currency (e.g $4.75)
Binary Coded Decimal is often used to represent currency or time data.
Denary to Binary Conversion
The easiest way to convert a denary/decimal number to binary is to use the Base-2 'doubling' technique.
Step 1 - write down the doubling numbers
Lets say that you want to find the binary for 56. Starting on the right of a piece of paper, start at 1 and keep doubling until you reach (or exceed) the number you want to convert. It's easiest if you start from the left when adding!
Step 2 - work out which numbers you need to add to together to make the number.
Work through from the left to right adding whichever numbers you can until you reach the target number.
Step 3 - write 1 under each number that you used.
Write a 1 under each number you used and 0 under each number you haven't.
Then you have your binary number:
56 = 0111000.
Just like in denary you can discard any zeros to the left (00460 can be written 460 in decimal). So your answer is 111000.
Binary to Denary Conversion
This is just the reverse of denary to binary, but a little easier because you are simply aadding numbers together
Step 1 - Write down your binary number
Write down your binary number in a grid, on the bottom row.
Step 2 - Write the powers of 2 numbers above, starting from 1 on the right.
Step 3 - Add up all the numbers that have a 1 below them
Why do computers use binary?
Review: Fill in the Blanks
Storing data in binary is straightforward and does not require converting between different formats, which ensures reliable storage on devices like , , and . Additionally, binary aligns perfectly with electrical circuits, where the "on" state represents a closed circuit and the "off" state represents an open circuit. This simplicity is crucial for the speed and of computers.
Binary allows computers to perform mathematical operations efficiently, especially when dealing with powers of 2. For instance, a left shift moves all bits one place to the left, effectively , while a right shift moves all bits one place to the right, effectively . The smallest unit of information in binary is called a , which can represent either a 0 or a 1, and a unit of four bits is known as a .
Complete! Ready to test your knowledge?
Introduction to binary numbers
- Introduction to Binary
- Reason 1: Reliability
- Reason 2: Ease of Storage
- Reason 3: Efficiency with Electrical Circuits
- Reason 4: Mathematical Operations
- Bits, Nibbles, and Bytes
- Special Encodings
- Denary to Binary Conversion
- Binary to Denary Conversion
Topic Tests
Videos
- Why do computers use binary?