Why does the computer use binary?

0
28

Binary – is considered to be a string of only 0 and 1 and is usually associated with computers. But why? Why do not computers use decimal systems instead of converting them all to binary? Would not it be more efficient to use higher counting systems? Because if you use binary, it looks like it will occupy more storage space.

I have been asked this question by both professionals and amateurs in the IT industry, more than half the professionals or non-professionals. But no matter who the question comes from, the answer is very simple.

1. What is digital?

First, we need to understand how the term is digital. A modern digital computer, in contrast to an old analogy, is based on principles that consist of two states “on” or “off”. This corresponds directly to the presence or absence of electric current. The status of “on” is assigned to the number 1 while the “off” state is for a zero.

The term “binary” refers to “two”. So a binary system is based entirely on two numbers 0 and 1 without the presence of any other numbers. This is the basis for the binary string to be formed. Each single binary number consists of either 0 or 1, which we call “bits.” Each bit corresponds to a single switch in a circuit. The more switches you have, the more you can make. So, instead of just one bit, we combine them into a group of 8 bits to form a “byte”. Byte here is the basic unit of storage, many bytes will have kilobytes, megabytes, … which are the terms you often hear when it comes to the capacity of the computer or the phone. Kilobytes are larger than 1024 bytes while Megabytes are 1024 times larger than Kylobytes.

2. Binary uses more memory than decimal system?

At first glance, it would seem that binary space consumes more space to represent the same number if compared to the decimal system.

  • For example, 150 in the decimal system is only 3 digits, in binary you have to use 8 digits as 10010110.

This argument will become useless when we need to display this number on the computer screen, All of them are stored in a binary system.

The only reason we find that 150 “smaller” than 10010110 is when we write it on a sheet of paper or see it displayed on the screen.

The more we increase the numeral, the less digits we need to denote for some, and vice versa. But this is against the principle of computer operation, which is a set of bits that represent one of two states that are “on” or “off.”

You can hardly find another state between “on” and “off” so that you can use a higher counting system (unless you consider the quantum computer will be mentioned later).

3. What is octal and hex?

The octal and hexadecimal system is a “shortcut” to binary representation. Both of these systems are represented by an integer of exponentiation of 2 (octal is the power of 3 while hex is the power of 4). Three digits in octal = 2 digits in hexadecimal = 8 digits in binary = 1 byte.

This creates more favorable to the people programming when denote everything in the 32-bit environment, the value used is the 32-bit color, eg FF00EE99 (instead 11111111000000001110111010011001).

4. Computers are not binary

Imagine a computer based on a decimal system. Then there are 10 possible states of electric current. And everything will be represented by numbers from 0 to 9. This is unlikely to happen with the composition of today’s computers, but it is possible for quantum computers to be mentioned later.

Is this system more effective? Suppose the switches of the binary computer system occupy the same physical space as the base 10 switches. Then those 10 systems will operate at higher productivity than is obvious. So even though the question of whether binary is “inefficient” is right in theory, it is not practical in practice today.

5. Why are all modern computers today using binary?

Talking so long from the beginning of the song, so what is the answer? The short answer is that computers today are not designed to recognize more than two signals (while quantum computers are not yet sold).

Binary is chosen because it is quite easy to distinguish the presence or absence of an electrical signal at a given time. This becomes even more costly as computers have to process billions of billions of these signals per second.

It would be foolish to use other base systems on these systems, since then the computer would have to move back and forth between the systems. That is why on-machine-designed-for-binary-only should be used for binary only.