Why 1’s and 0’s?

We humans have languages to communicate with each other. So do machines. But their language only contains 1’s and 0’s – Binary. Almost all digital systems that we have are known to use Binary.

Wait a second; we perceive 1’s and 0’s like a number. But how does a piece of silicon perceive it?

1 is true, 0 is false.  (like a condition)

Or perhaps; 1 is ON and 0 is OFF. (like a switch)

Or; we can reframe it as, 1 is present, 0 is absent.

Or; 1 is the presence of an electrical signal, 0 is the absence of an electrical signal.

And we know an Integrated Circuit is electronic in nature so it can understand electrical signals easily. Considering this, if our microcontroller is operating at 5 V, it can perceive the presence or absence of a 5 volt signal. Similarly, if our system operates on 5 volts, the presence of 5 volts on a pin means logic 1 and the absence of 5 volts or presence of 0 volt means logic 0.

The image below shows the propagation of digital electric signal with respect to time.SIgnal

Why convert to Binary?

If it can perceive voltage levels, why not have more voltage levels? Say 10, then we can compute easily in decimals rather than binary.

This question has a very deep and lengthy explanation, but will try to keep it short and simple.

Let’s analyse the question first.  Imagine a computer system designed on base-10 numbers. Then, each switch would have 10 possible logic states. Each bit (here the smallest data type) can hold 10 values unlike only 2 on a normal computer. A byte (8 bits) of data on such a computer can hold a number from 0 to (10^8=) 100,000,000. Whereas our present computers can only hold 0 to (2^8=) 256 values in a byte of data. Such a computer will fit more processing power into same physical space. The size of IC’s will drastically reduce allowing your PC’s and mobile phones to be lighter and faster. And maybe, the size or your hard-drive will reduce to that of a memory card or even smaller.

Isn’t this system more efficient?

Though the concept may seem very lucrative, when it comes to the physics in our real world, things become really difficult and messy. By my personal experience as an engineer, you get millions of ideas in theory, but when it comes to implementing these theories, you keep on getting real world problems. And most of your theories end up being practically impossible, because of the present technological limitations. Theories on paper become hard to replicate in practice. I am not saying its impossible, but sometimes we are limited by the technology of our time. Though quantum computers use a similar concept, they are not available for commercial use as of now.

Now, Let’s see why such a system is not practical.

Reason 1 : Generating more switching states is difficult. To generate 10 different voltage levels we will need a switch that has 10 possible states. This is not possible with regular electronic components of today, but it is theoretically possible on a quantum level.

Reason 2 : Detection of more switching states is difficult. We can detect merely the presence or absence of a voltage easily and quickly. To sense different voltage levels we will need additional electronics. This will make the circuit more complex, will reduce speed and increase cost.

Reason 3 : Vulnerable to noise. With a lot of electronics surrounding us, an electronics noise can easily cause fluctuations in the voltage level. If we are using multiple voltage states, the difference in voltage between two consecutive states will be quite small, making it more vulnerable to noise.

For example, we decide to develop a system operating at 3.3 volts. So if we want to have 10 switching states in such a system we will have 3.3/10=0.33 volt quantization levels. i.e. the difference between voltages of two switching states will be 0.33 volts. This voltage is so small and can easily be misinterpreted due to noise. You may argue, why not increase the voltage to 33 volts? Then each switching state will have 3.3 volt again.

You may argue, why not increase the voltage to 33 volts? Then each switching state will have 3.3 volts again.

The problem here is high voltage. As the voltage will increase, the size of my system will also increase. When voltage increases, the distance between conductors has to increase, to avoid flashover. That is why we generally use 5 V and 3.3 V for microcontrollers to limit the size and power consumption of a chip.

NOTE: Quantum computers which have drawn limelight recently may be the future of computers. It leverages the fact that there are more levels existing between the presence or absence of a thing, the very basis on which the theory of Quantum Mechanics lies. This will drastically increase the computation speed, as in a single quantum bit, we will be able to store a lot more data. Limitation:  The development of actual quantum computers is still in its infancy, and the solution is very costly. But I believe scientists will mitigate the drawbacks soon.

How binary information is processed?

As mentioned in my previous post, Logic gates are the building block of a digital circuit. These logic gates are created by connecting transistors. The microprocessor in our Personal Computer has millions of them. These are not the typical transistors that we use in projects, these are special MOSFET (Metal-Oxide Semiconductor Field-Effect Transistor). Such transistors are connected and arranged to perform various operations. VLSI (Very Large Scale Integration) is the subject dealing with the hardware at such small scale.

The image below shows the addition circuit developed using logic gates. The study of developing logic using logic gates comes in under the realm of Boolean Algebra.HalfAdder FullAdder

The first image shows a half adder circuit, which adds two bits and generates the output along with a carry bit(like we have in classroom addition). The second image shows a full adder circuit, which adds two bits and a carry bit, to give the output as a sun along with a carry bit. If you find this interesting you can search online to know how these logic gates contribute to forming 8-bit adder and multiplier too.

One thought on “Why 1’s and 0’s?”

Leave a Reply

Your email address will not be published. Required fields are marked *