Computers Don’t Actually Store Data in 0s and 1s

Dunja Vesinger
5 min readSep 4, 2023

They store it in flip-flops.

Photo by Ridwan Muhamad Iqbal on Unsplash

It seems to be common knowledge nowadays that computers store data as sequences of 0s and 1s. However, that’s not actually true. While thinking about the data stored in a computer as 0 and 1 can be a useful abstraction, it can be quite misleading if taken too literally.

A while back, I saw a question on Quora (which I was unfortunately unable to find again) that I thought was quite interesting and illustrated how the whole “0 and 1” story can be deceiving if you accept it as-is.

The gist of the Quora question was this:

“Would it be more efficient if we stored information inside computers using something smaller than 1 and 0, like dots ‘.’ and empty spaces?”

Because, of course, dots and whitespace are smaller and would take less room than digits like “0” and “1”. And the efficiency of the computer can, indeed, be improved if we manage to store the same amount of data using less space. (Engineers do that all the time to optimize computers and programs.)

Unfortunately, this can’t be achieved by replacing “0” and “1” with other characters. Because computers don’t actually use “0” and “1”. If you open a computer (or any other electronic device) and look inside, you won’t see sheets with long sequences of “0” and “1” written on them. And that’s not because they’re too small for the naked eye to see. It’s because there are none.

How Do Comuputers Store Data?

Computers store data using a binary system, that bit is correct. Binary means there are only two different things that can be used to represent information. (When we do math, we have a decimal system, which has 10 different things used to represent information. “Things” are digits from 0 to 9 and the “information” they represent is various numbers, like 99 or 404.)

Inside a computer, “information” is everything you see on the screen. It’s all written down somewhere inside a computer using sequences of binary states. And we like to think of those binary states as “0” and “1” because it makes our lives simpler. But when you open an electronic device, you won’t be looking at numbers. You’ll be looking at a bunch of electronic components. And some of them are used to store information in the computer. We call these flip-flops.

What are Flip-flops

Flip-flops inside the computer have nothing to do with shoes. (Unless you use them to store text and images featuring flip-flops.)

Flip-flops are small pieces of electronics. There are various different ways to actually create a flip-flop from (even smaller) electronic components, but the principle in which they work is always similar.

There are two inputs and one output. (“Inputs” and “outputs” are typically just wires through which electric current can flow.) The output of a flip-flop can be in one of two states: it can have high voltage or it can have low voltage. Inputs of the flip-flop can be used to set the output of the flip-flop. One input, when triggered, sets the voltage of the flip-flop to high. The other input, when triggered, sets the voltage of the flip-flop to low. The voltage at the output of the flip-flop remains the same until an input is triggered to change it.

So one flip-flop switch “saves” one tiny piece of information: whether there is high voltage or low voltage on its output. This is the smallest piece of information a computer can store, and we call this piece one “bit”.

Several flip-flops in a row for a sequence which can be used to store a more significant chunk of information. Computers nowadays have thousands of these flip-flops inside them. The more flip-flops there are, the more data can be stored in a computer.

Memory of a Computer

Because they store information, flip-flops are typically called the “memory” of the computer.

More concretely, flip-flops form the Random Access Memory, or RAM, of your computer. This is the memory that stores information on your computer only while it’s turned on. We use more permanent storage methods, such as hard drives, to store information while the computer is turned off. However, all information from hard drives needs to be read and loaded into RAM before your computer can do something with it, like show it to you on the screen.

You’ve probably heard of some measures which tell us how many flip-flops there are in a computer. 8 flip-flops (or 8 bits) are called a byte of memory. Many bytes are usually needed to store something that’s useful for us, like images or documents. We typically measure these in kiloBytes or megaBytes. One kiloByte has 1024 bytes and one megaByte has 1024 kiloBytes. That’s a whole lot of flip-flops…

However, your computer can store multiple documents and images to its memory at the same time. Today, RAM memory of computers is usually measured in gigaBytes. And one gigaByte has 1024 megaBytes. If you try to multiply all of that, you’ll figure out your computer actually has billions of flip-flops!

So, basically, computers store data as “high voltage” and “low voltage” outputs of many many flip-flops.

This “high voltage” and “low voltage” stuff can be lengthy to write and a bit fussy to think about when we’re trying to do some calculations with these bits. So we typically represent high voltage with the number “1” and low voltage with the number “0”. That’s why we sometimes say computers store data as 0s and 1s.

It would be technically correct to say computers store information using the binary system. And behind that binary system, there are long sequences of high voltage and low voltage outputs of flip-flops.

As mentioned above, flip-flops only account for RAM. There are other types of memory, such as hard drives, flash drives, magnetic tapes, CDs, … These storages have different methods of storing data. For instance, hard drives typically use magnetic poles. But they all have one thing in common — the data is always stored in a binary format.

I hope this helped you gain insight into how computers store data and why “binary” doesn’t necessarily translate to zeros and ones. Thank you for reading!

--

--

Dunja Vesinger

Software Engineer. Passionate reader. Aspiring writer.