how transistors become a microprocessor?


So I was wondering how multiple transistors coordinate to become a microprocessor.

In: Technology

Hmm this requires a little bit of digital logic design knowledge, but essentially transistors form logic gates to become active (or on) upon meeting conditions. The main ones are

* AND: If input A “and” input B is on, the answer is true, proceed. If input A is off “and” input B is off, proceed. If input A is on but input B is off (notice there is no “and”), the answer is false, do not proceed (and vice versa)
* OR: If input A is on “or” input be is on, proceed. If not, do not.
* XOR (either or but not both): if input A is on “or” input B is on, the answer is true, proceed. However, if both input A and input B are on, the answer is false, do not proceed. If neither is the case, do not proceed.
* NOT: If the input is “not” on, proceed. If it is, do not proceed.

Essentially you put millions of these gates together to set conditions that together make up a microprocessor. At a basic level you have “switches” that turn on/off lights. At a more complicated level, you have a calculator that changes bits (or 1s and 0s that in a line form binary numbers). At a very complex level you have everything you see in a computer or a smart phone.

Transistors do not coordinate anything. Transistors are only building blocks for making circuits that take one set of bits (0’s and 1’s) and produce another set of bits, precisely according to specification. With enough circuits like that connected to each other, you can perform an operation and obtain useful result after turning the power on.

Transistors are just there to control flow of electricity, everything we understand as computing is done logically, on more abstract level.

First thing you need is a clock. Something which goes from 1 to 0 and back again repeatedly. This is provided by an external oscillator. Now you have to keep track of this time in order to know when to do things. To count the time you arrange the transistors into a counter, this is tricky and most digital designers surprisingly would not know how to make d type flip flops from individual transistors, it’s all in feedback, but I digress. Once you can count the clock, you can read instructions for the microprocessors instruction memory, which tells you which connections to make to the different blocks (memory, arithmetic blocks) and the rest is quite straight forward. The counter points to the next “thing to do” i.e instruction which says “add a and b” so you make connections which place a and b into the inputs to the processors calculator and hit go, the clock ticks, you count to the next instruction which tells you to connect the output from the alu to a piece of memory. These “connections” are the transistors themselves. Instructions are 1s and 0s which go into the “on/off” control pin of a transistor, which can be arranged into “gates” which can be built into functions. The magic behind microprocessors is the clock, keeing track of this allows you to run a sequence, which makes use of a set of fixed functional blocks to do an incredibly wide variety of tasks.

Transistors in digital computing are basically being used as a switch.

Consider 2 switches, both connected to a light bulb. If ether switch is on then the buld bulb is on. This is fundamentally an AND gate.

Another key GATE or logic is NOT. This has only one input and the output is the opposite. Input is ON (1) out out is OFF (0) ,a and vice versa. Think of a light switch mounted upside down – you flip it UP and the Light goes off. This may seem very trivial – but it is valuable.

We use transistors to build other “fundamental” gates. ( BUT with just an NOT and AND – we can build any other logic).

From these logic gates we then build more complex systems, like counters, adders, memory etc.

It becomes complex (state of the art in a CPU is over 40 BILLION transistors)- but the fundamentals are actually pretty basic.