# How does a computer work?

You may think that a computer is complex, but at its core, a computer is so simple that it can boggle the mind.

You may have heard of a computer working in binary – with 0s and 1s. You may have also heard that a computer chip is comprised of transistors. Now let us demystify binary and transistors. A transistor is nothing but a tiny switch – very similar to one we use to turn lights on and off. When a transistor is turned on, it is said to represent the ‘1’ state. When it is turned off, it is in the ‘0’ state. If we place transistors in a row, we can represent any number, since we can convert binary numbers into any other base.

In a manner similar to how keys on a set of piano keys pushed together can produce chords, a bunch of switches arranged in different configurations can perform mathematical and logical operations. Now those numbers can also be combined using any arithmetic operation. A standardized mapping (also called encoding) of binary digits can help us represent various alphabets and symbols we use to write texts. This is nothing but a table that maps out binary values to letters. Et voila – a bunch of tiny switches can now represent text.

I could go on and on here. Every function of a computer boils down to a bunch of tiny switches and wires that connect them. Those wires are what you see when you open up a computer’s PCB and see the tiny lines of metal that run on its surface.

Any complex system, at is essence, is governed by remarkably simple components. Most complexity comes from repeating a simple construct over and over, until it gets hidden and obscured. True expertise lies in being able to peel back these layers to connect what we see on the surface to how it happens at the most fundamental level.

Inspiration: Patterns on the stone