Why Computers Use Binary

Binary numbers – seen as strings of 0's and 1's – are often associated with computers. But why is this? Why can't computers just use base 10 instead of converting to and from binary? Isn't it more efficient to use a higher base, since binary (base 2) representation uses up more "spaces"?

I was recently asked this question by someone who knows a good deal about computers. But this question is also often asked by people who aren't so tech-savvy. Either way, the answer is quite simple.

What is "digital"?

A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".

The term "binary" implies "two". Thus, the binary number system is a system of numbers based on two possible digits – 0 and 1. This is where the strings of binary digits come in. Each binary digit, or "bit", is a single 0 or 1, which directly corresponds to a single "switch" in a circuit. Add enough of these "switches" together, and you can represent more numbers. So instead of 1 digit, you end up with 8 to make a byte. (A byte, the basic unit of storage, is simply defined as 8 bits; the well-known kilobytes, megabytes, and gigabytes are derived from the byte, and each is 1,024 times as big as the other. There is a 1024-fold difference as opposed to a 1000-fold difference because 1024 is a power of 2 but 1000 is not.)

Does binary use more storage than decimal?

On first glance, it seems like the binary representation of a number 10010110 uses up more space than its decimal (base 10) representation 150. After all, the first is 8 digits long and the second is 3 digits long. However, this is an invalid argument in the context of displaying numbers on screen, since they're all stored in binary regardless! The only reason that 150 is "smaller" than 10010110 is because of the way we write it on the screen (or on paper).

Increasing the base will decrease the number of digits required to represent any given number, but taking directly from the previous point, it is impossible to create a digital circuit that operates in any base other than 2, since there is no state between "on" and "off" (unless you get into quantum computers... more on this later).

What about octal and hex?

Octal (base 8) and hexadecimal (base 16) are simply a "shortcut" for representing binary numbers, as both of these bases are powers of 2. 3 octal digits = 2 hex digits = 8 binary digits = 1 byte. It's easier for the human programmer to represent a 32-bit integer, often used for 32-bit color values, as FF00EE99 instead of 11111111000000001110111010011001. Read the Bitwise Operators article for a more in-depth discussion of this.

Non-binary computers

Imagine a computer based on base-10 numbers. Then, each "switch" would have 10 possible states. These can be represented by the digits (known as "bans" or "dits", meaning "decimal digits") 0 through 9. In this system, numbers would be represented in base 10. This is not possible with regular electronic components of today, but it is theoretically possible on a quantum level.

Is this system more efficient? Assuming the "switches" of a standard binary computer take up the same amount of physical space (nanometers) as these base-10 switches, the base-10 computer would be able to fit considerably more processing power into the same physical space. So although the question of binary being "inefficient" does have some validity in theory, but not in practical use today.

Why do all modern-day computers use binary then?

Simple answer: Computers weren't initially designed to use binary... rather, binary was determined to be the most practical system to use with the computers we did design.

Full answer: We only use binary because we currently do not have the technology to create "switches" that can reliably hold more than two possible states. (Quantum computers aren't exactly on sale at the moment.) The binary system was chosen only because it is quite easy to distinguish the presence of an electric current from an absense of electric current, especially when working with trillions of such connections. And using any other number base in this system ridiculous, because the system would need to constantly convert between them. That's all there is to it.

Posted on 05/15/2010 04:04 PM | Permalink

Comments (38)

Posted by Taylor Jasko on Saturday, May 15, 2010 @ 9:47 PM
Read it all, and excellant post, Lyosha!

Yeah, I do wonder how future computers will be.

Like you said, in binary, you have two modes, on/off, so it does make sense to be in a computer.

Who would even use a quantum computer?
Options: Reply | Quote

Posted by nookkin on Monday, May 17, 2010 @ 12:27 AM
@Taylor Jasko Quantum computers are a thing of the future. Who will use them? Everybody, much like people use regular transistor-based computers and devices today. Why quantum? Because they solve the many inevitable problems of today's transistor-based computers, such as the physical universe's limitations of transistor density (Moore's Law won't last forever).
Options: Reply | Quote

Posted by Ben on Wednesday, October 6, 2010 @ 6:08 PM
@nookkin Technicaly a "quantum computer" is possible by simply varying the current or making a different path for the current to travel, or a combination of both.
On the topic of moores law,
if you go by definition then moore's law isn't realy a law, it is just an uncannily accurate observation and prediction. Why they called it moore's law when it should be called Moore's Theory of computer miniatureization
Options: Reply | Quote

Posted by Sujit on Friday, December 24, 2010 @ 3:33 PM
Whats a nice description, really mind blowing
Options: Reply | Quote

Posted by Ben on Saturday, December 25, 2010 @ 9:56 AM
Thanks, sujit.
Options: Reply | Quote

Posted by jayvin on Sunday, January 23, 2011 @ 2:43 PM
These "on/off" states (at least as far as signal transmission goes anyway) could be changed from (0volts/5volts) to (0volts/1volt/2volts/3volts/4volts...) so you could get a base 16 if you wanted (or base 10 for ease of human understanding), but I am not familiar with how the "switches" work, so storing this data might be harder (as stated in original article). but investigation into this area (of creating multi-state switches) will probably be a valuable research field in the near future.
Options: Reply | Quote

Posted by Jayxx1234 on Sunday, January 23, 2011 @ 2:45 PM
Great article. Was wondering about this for years.
Options: Reply | Quote

Posted by nookkin on Sunday, January 23, 2011 @ 3:47 PM
@jayvin That's definitely possible, but it would involve far more complicated circuitry and might simply be less reliable. One of the cool things about binary is that you get a nice amount of tolerance -- "0V off, +5V on" actually has a tolerance of "0-0.5V off, +2V-+5V on", so a voltage dip won't cause too many issues. In a 6-state system (0V, 1V, 2V, 3V, 4V, 5V) for instance, a simple voltage dip or spike (i.e. static electricity, bad power supply) could corrupt data very easily.
Options: Reply | Quote

Posted by jayvin on Sunday, January 23, 2011 @ 3:58 PM
@nookkin Good point. In that case, state1: 0-2v, state2: 3-4v, state3: 5-6v, state4: 7-8v and so on might work, or even a larger gap to allow higher tolerance? However, it would mean that components would need to handle up to say 20v without burning out or damaging. This might be too much worry for too little gain, but its a theory anyway.
Options: Reply | Quote

Posted by Ben on Monday, January 24, 2011 @ 8:24 PM
@nookkin Well, you wouldn't exactly want a super expensive, super sensitive quantum computer to be open to static electricity and plugged into a wall socket, they would have them In a lab plugged into their own power generator that is checked and maintained every 10 minutes just for the reasons that you mentioned and also so that they could use smaller, more precise amounts of varying currents.
Also, no one has mentioned the different paths idea.
Options: Reply | Quote

Posted by nookkin on Wednesday, January 26, 2011 @ 10:56 AM
@Ben That definitely makes sense, but it means that this technology won't be seen by end users until they alleviate those issues. Unless they alter the way memory is stored, i.e. it's currently stored using "on" and "off" cells but could theoretically be stored via one of many orientations of electrons, it won't have much of a practical use.

The "different paths" idea still reduces to 2 discrete voltage states, making it expressible using binary. (Please correct me if I'm wrong here.)

Those are pretty cool ideas though, and I guess I'll be dealing with huge paradigm shifts in computers as I get older and the limits of current computers are reached.
Options: Reply | Quote

Posted by Ben on Friday, January 28, 2011 @ 6:27 PM
Well, computers do already use something else to store info, namely very shallow groves in the surface of the CDs and DVDs and the spacing, depths, and lengths of these groves indicate the data. These are very efficient ways to store data and allow a near limitless amount of possibilities of data.

The quantum computers would be used in labs for a long while they refine them to handle end users and, eventually, small enough for a home desktop.
Options: Reply | Quote

Posted by Wilton Blake on Saturday, March 19, 2011 @ 2:43 AM
Thank you so much for this simple explanation. I have to imagine that multi-state switches are what will allow our computing power to continue to increase exponentially.
Options: Reply | Quote

Posted by Cypher on Thursday, June 16, 2011 @ 9:26 PM
Options: Reply | Quote

Posted by azyr on Tuesday, July 12, 2011 @ 10:38 PM
i do really love numbers !!!
Options: Reply | Quote

Posted by Chuck on Thursday, July 28, 2011 @ 4:58 PM
I'm not a computer guy, but I'm taking a Computer Technology class for my teaching credential, and we went over a simulation of the calculations of a binary system and compared it to a decimal system. Since the decimal system counted in terms of 1/100 it took a hugely greater amount of time than the binary system. It seemed like binary was faster, but base 10 would be more powerful. Am I understanding this correctly?
Options: Reply | Quote

Posted by nookkin on Thursday, July 28, 2011 @ 6:20 PM
@Chuck They're both equally "powerful" in that they store numbers.

Binary is far more efficient for today's computers to process because it's easy to build a reliable circuit that has distinct "on" and "off" states. Two values in the real world imply the use of a 2-valued number system.

Binary is also simpler; the basic operations of addition and subtraction only involve 3 possible states (0, 1, carry/borrow) versus 11 possible states for decimal.

Decimal is significantly more intuitive for humans, however, since a) we normally have 10 fingers and b) our language was built around a base-10 system.
Options: Reply | Quote

Posted by Izzy on Thursday, September 1, 2011 @ 6:32 PM
ik u can only have on or off but instead of that, y not use something else? such as light? and something in between the sender and receiver to bend light? so u can have inf amount of... therefore u can represent anything w/ lights. so like this:
S 0 R
s=sender r=receiver 0 glass or some shit.
0 will be kinda like glasses but movable by the computer to make any character.
Options: Reply | Quote

Posted by nookkin on Saturday, September 3, 2011 @ 7:28 PM
@Izzy Sending light through glass fibers is quite commonly in use today -- it's known as "fiber optics." (They use it for internet connections, optical S/PDIF audio, and more.)

There are still limits as to how much information you can send -- namely, the speed of light, and the attenuation caused by a non-100%-clear cable over longer distances. It's still significantly faster than copper wire and has the additional benefit of not being influenced by EM interference or varying ground potential (over long distances).

Light is still used digitally though, through on/off pulses. It's easy to send tons of fast, timed on/off pulses, but it's much more difficult and error-prone to measure analog levels of light. You need something that has well-defined quantum states, and unless we're talking positions of an electron or something like that, the only ones that can be easily achieved are "off" and "on."
Options: Reply | Quote

Posted by subhashh thakur on Wednesday, September 21, 2011 @ 3:42 AM
mie compter ca techer laugh on me whn i askd him dat;

y we use binary no. in computer;

gud job be thx a lot;
pls tell me the advantages of qunatum computer over classical computers ;

iH9ns
Options: Reply | Quote

Posted by subhashh thakur on Wednesday, September 21, 2011 @ 3:43 AM
mie compter ca techer laugh on me whn i askd him dat;

y we use binary no. in computer;

gud job be thx a lot;
pls tell me the advantages of qunatum computer over classical computers ;

iH9ns
Options: Reply | Quote

Posted by nookkin on Wednesday, September 28, 2011 @ 11:36 PM
@subhashh thakur Quantum computers greatly simplify certain mathematical calculations due to having multiple simultaneous states -- that is their main advantage.
Options: Reply | Quote

Posted by Coolstuff101 on Tuesday, October 18, 2011 @ 12:26 PM
Thank you. My teacher has confused me but thanks to your article I get it now!
Options: Reply | Quote

Posted by musiimenta mak bit on Friday, October 21, 2011 @ 3:08 AM
people do not really love the use of numbers and that is why binary becomes the best.
Options: Reply | Quote

Posted by shalti singh on Wednesday, December 7, 2011 @ 9:36 AM
nice answer bu ddy
i really apprecoat with the blog
Options: Reply | Quote

Posted by shalti singh on Wednesday, December 7, 2011 @ 9:38 AM
nice answer bu ddy
i really apprecoat with the blog
Options: Reply | Quote

Posted by Daylon on Saturday, December 17, 2011 @ 12:51 AM
Wouldnt that then be an analog circuit?
Options: Reply | Quote

Posted by nookkin on Saturday, December 17, 2011 @ 1:06 AM
@Daylon Digital circuits have very specific quantifiable states -- analog circuits are continuous and cannot be fully quantified, only approximated.
Options: Reply | Quote

Posted by nomacromadumafropidocilicious on Friday, December 30, 2011 @ 10:19 AM
Would it be possible to have multiple binary circuits to make a base 10 system? For example when circuit 1 is on it represents 1 when 2 on it represents 2 etc? Or would there be complications in timing?

Oh and if higher numbers mean faster processing speeds, would a base 3 system be faster than binary? And then technology could improve from there, base 4, 5, 6.
Options: Reply | Quote

Posted by nookkin on Friday, December 30, 2011 @ 6:53 PM
@nomacromadumafropidocilicious Such a system would still be considered binary, because each circuit will have a distinct "on" and "off" state.

If you're talking about using 10 different wires for each signal (1 wire on = 1, 2 wires on = 2), it would simply be inefficient. Would you rather have 10 possible combinations or 2^10 = 1024 possible combinations for a given hardware cost?

Higher numbers do not necessarily mean faster processing speeds. It greatly depends on how the rest of the system is set up. Think about it this way: are 5 light bulbs brighter than 1? Not if there are five nightlight bulbs versus 1 100W bulb!
Options: Reply | Quote

Posted by ben on Sunday, January 8, 2012 @ 4:29 AM
please help me to understand better. why do computer uses binary number representation
Options: Reply | Quote

Posted by ben on Sunday, January 8, 2012 @ 4:29 AM
please help me to understand better. why do computer uses binary number representation
Options: Reply | Quote

Posted by Ben on Monday, January 9, 2012 @ 6:43 PM
Computers use binary numbers because they are SUPER simple for the computer to transcribe. Think of it like different languages. Chinese has a character for almost everything, but the English language only has 26 characters. The computer uses 2 characters. True that the "Words" have to be longer, but its easier to "remember" 2 characters as opposed to 26 characters in English or who knows how many characters in Chinese. Its also simpler to interpret those characters, because binary is actually 2 states of the computer. "On" or "off". the computer KNOWS that there is either electricity flowing through a component, or there is not. and that is much simpler than having to measure the amount of voltage in a component.
Options: Reply | Quote

Posted by Fatty patty on Tuesday, January 17, 2012 @ 10:02 AM
@Ben GO FUCK YOURSELF!!!!!!!!!
Options: Reply | Quote

Posted by Ben C. on Tuesday, January 17, 2012 @ 3:30 PM
that long Ben was me those short ben ones was someone else
and btw fatty patty, what is your problem?
Options: Reply | Quote

Posted by a name on Monday, January 23, 2012 @ 12:10 AM
Pretty sure base-10 computers used to exist a long time ago; they weren't produced for very long though.
Options: Reply | Quote

Posted by a name on Monday, January 23, 2012 @ 12:31 AM
@a name "In the early 1950s most computers were built for specific numerical processing tasks, and many machines used decimal numbers as their basic number system – that is, the mathematical functions of the machines worked in base-10 instead of base-2 as is common today. These were not merely binary coded decimal. Most machines actually had ten vacuum tubes per digit in each register."

https://en.wikipedia.org/wiki/History_of_processors#1950s:_early_designs
Options: Reply | Quote

Posted by kenoly on Friday, January 27, 2012 @ 12:57 PM
I love this. It answers all my questions on the binary system and computer app. Im a student of computer science and i hope to ask u more questions where im confused and also hope to meet you someday.
Options: Reply | Quote

Leave a comment:

You may format your comment using BBCode. (More information) Your e-mail address will not be displayed publicly. Please read the Comment Rules and Tips, Privacy Policy, and Disclaimer before posting.
Valid XHTML 1.0 Strict Valid CSS level 3 Level A Conformance to Web Content Accessibility Guidelines 1.0
Web Design by Nookkin