Skip main navigation

Why do computers use binary?

If a computer worked in denary, then for each digit, it would need to be able to store one of at least ten different possibilities.

Start by thinking about the most simple use case: computers need to store data. If a computer worked in denary, then for each digit, it would need to be able to store one of at least ten different possibilities. At the hardware level, that would mean using some electronic component that could be in any of ten different states, to represent the ten digits from 0 to 9.

Such components do exist. In fact, there are components that can represent an almost infinite number of states — but they are unwieldy and complicated to use in electronic circuits.

A potential divider circuit containing a multimeter reading a range of different voltages as a potentiometer is turned.

A much simpler component would be one that has only two states — on or off, for instance. A component like this is called a switch.

Animated GIF showing a switch changing a light bulb from being on (labelled as 1) to off (labelled as 0) and back again.

You are now going to look at how a switch can be used to store binary numbers. Shown below a simple circuit. You don’t need to understand exactly what is going on, but notice that at the top, the multimeter shows a reading of 1 V. That is a 1.

 

A potential divider circuit where a multimeter reads 1.00 V.

 

You want to be able to change the state of this circuit using a simple component, so you add in a switch. With the switch in place, the circuit state can be controlled by flipping the switch.

 

A potential divider circuit where, when the switch is on, a multimeter reads 1.00 V, and 0 V when the switch is off.

 

When the switch is in the “on” position, a 1 is shown on multimeter. When the switch is flipped to the “off” position, a 0 is shown on the multimeter. Therefore, I have represented the numbers 1 and 0 using a simple switch.

If you want more digits, you just need to add in more circuits, and you can represent as large a binary number as you need. You just need one switch for every digit you want to represent.

Three copies of the previous circuit, with the switches being changed independently to represent different binary numbers with 3 digits.

The switches used in modern computers are so cheap and so small that you can literally get billions of them on a single circuit board.

This article is from the free online

How Computers Work: Demystifying Computation

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education