Eli5 how do the mechanics in CPUs work?

137 views

Like, yes, i know it’s electric and such. But I recently talked to an engineer and he, as I understand, said that there are still switches and other mechanics but microscopic inside CPUs and circuit boards.

In: 2

7 Answers

Anonymous 0 Comments

Silicon is a weird element. It is a metalloid and a semiconductor, which means it acts like a conductor sometimes and not a conductor other times. One of the ways to control whether it acts like a conductor at any moment is a combination of trace elements and electricity.

This means that silicon can be used to create non-moving, electrically controlled ‘switches’ that we call transistors. Some conduct between the ends when they are powered, others stop conducting between the ends when they are powered.

There is nothing practically moving inside the CPU (electrons and heat technically count).

Anonymous 0 Comments

How a CPU works in 20 minutes.

But yes essentially a CPU is just a super dense cluster of microscopic switches. Switching at unbelievable speeds.

Anonymous 0 Comments

At the lowest level, there are transistors (e.g. MOSFETs) that amplify and switches the current of part of a circuit. To give you an intuitive understanding of a MOSFET, first imagine a node with two inputs and an output. The first input is called the source (holding some current) and the second input is the gate, which when “turned on”, amplifies the output. You can already see that this forms a component with “high” and “low” signals.

A flip-flip is the next building block that holds a bit of value (0 or 1) and is built using transistors.

These elements are then used to build silicon chips or integrated circuits and eventually the processor.

**Fun fact**: When people say Moore’s Law is slowing down, they mean that technology isn’t improving enough to get transistors smaller. The smaller the transistors, the more you can fit on the board. The more you fit on the board, the more parallelism and hence faster the processor.

Anonymous 0 Comments

Not in CPUs, but there are moving devices on silicon chips – they are called MEMS (micro electro-mechanical systems). If your phone knows which way up it is then that is because of a MEMS gravity sensor. Your phone also probably has a MEMS accelerometer.

These MEMS devices typically make use of long thin (at the scale of microchips) arms [like so](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRDgbbUndAncTqGr_yTKZ4JKU352_HriiZaew&usqp=CAU) which are attached at one end and free to wiggle at the other. As the end of the arm gets near one side or the other you can detect that proximity electrically and so work out how the arm is wiggling. This tells you how the whole device is moving etc. The exact techniques used to make these structures are not particularly complex, but really quite hard to explain without diagrams. Suffice to say that chips are built up in layers, but you can also etch material away so you can build up one of these long arms and then etch away the material underneath that was holding it to the body of the chip (by making the material in that particular layer susceptible to etching). Interestingly we actually have micromachining tools (sort of like miniature drills) that can work down to the sizes of chips. So you might build up a few layers, drill out some holes, build up some more layers, do some etching etc.

A really cool emerging technology is microfluidics where you have tiny pipes and channels in your chip that small amounts of fluid can flow through and be tested.

[A cool MEMS device](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR2ohvxLMk7XfsAKG0_BNEfGWmWOUEPx4SOgw&usqp=CAU)

Anonymous 0 Comments

Yes, there are switches, they are called MOSFETs (which are a type of transistor). However, these switches are not exactly mechanical: the only moving parts they have are “electricity particles” (electrons). They use the fact, that electrons are repelled by each other, but are attracted to atoms.

MOSFET consists of two conducting “isles”, separated by a “desert”. Electricity cannot pass the “desert”, so the MOSFET switch normally breaks the circuit. MOSFET switches on by building a “hanging bridge” out of electrons between the isles.

The bridge building is controlled by the gate, that hangs above the “desert”. Gate is separated by glass, which electricity cannot pass, but it can still “sense” attraction or repulsion. When the gate attracts electrons, they stick to the glass, creating a bridge connecting two isles. When the gate repels, the bridge shatters, isolating isles from each other.

Anonymous 0 Comments

They are only transistors. A transistor is basically an electrically commanded switch.

Arrange transistors in some way and you make logic cells, AND, OR, NOT, that kind of thing. arrange these in some way and you get memory, additioners, multipliers, and so on.

Mix all that in a billion way and you get complex instruction sets across multiple cores and memory cache, basically a modern CPU.

Anonymous 0 Comments

The switches are transistors.

Transistors are small, solid-state (no moving parts) components. They contain a semi-conductor material laid out in a very specific way, almost like a tiny electrical wire, but imagine three sections, where the middle section is a different material to the others.

As the electricity / electrons try to cross through this material they make it through the outside materials but are stopped by the middle material (the same as if it were an insulator). However, by putting a tiny bit of electricity through that middle material, those first electrons can be helped to “jump the gap” and so the electricity will flow through all three materials as if it were a conductor. Hence “semi” conductor. In certain patterns, and with certain help from outside, the material can conduct or not conduct depending what you want it to do.

This is then an electrically-controlled switch. You put a little electricity into the middle, and a lot of electricity can flow out across the whole device. You turn the power off to that little “control” in the middle and the transistor becomes an insulator and the electricity flowing across the device stops.

By arranging the transistors VERY cleverly, you can then get them to do more than just switch electricity on and off, you can make them even do the opposite of what you intend – to flow when there is no control power and not flow when there is control power. From such arrangements of transistors, you can form logic gates, from logic gates you can do arithmetic, once you get to arithmetic, you can make pretty much everything else that a computer does.

Billions of such transistors, arranged in just the right way, with zero moving parts so just a flat sheet that never moves, allow the electricity coming in to change based on any condition we like, and by feeding the output from one transistor to the input of others, you can make extremely complex circuits. All the inputs from keyboards, mice, joysticks, etc. eventually go through such an arrangement of transistors as an input (i.e. a electrical signal or not) and depending on how it’s been made, you can make it so that a programmer can choose what happens when you press a key or click a mouse to change an output (the screen, a printer, a speaker, etc.) depending on how they want.

All done by a little “electrical wire” with a barrier in it that you can make conduct or not conduct, and change that billions of times every second, depending on what you want to do.