By etching patterns on semiconductor you can build transistors, which if connected correctly can make up logic gates, which can be connected into logic circuits implementing registers, adders, state machines etc. But honestly, to explain it all in sufficient detail that you really go from not knowing electronics to understanding how a CPU works, that will simply not fit in a reddit comment. The level of conceptual understanding isn’t all that difficult, but it just takes time to learn and compressing to few paragraphs of text just looses too much information. Youtube is full of educational materials on the topic, just go and get started with something.
At its most basic level it is just a series of switches, in this case, transistors, and with transistors you can make logic gates, Think of logic gates like special switches that control electricity in a circuit.
They take in one or more signals (like “on” or “off”) and use these to decide what signal to send out. It’s kind of like following simple rules to turn things on or off.
These are logic switches, so you can make configurations like:
* NOT Gate: Flips the signal (on becomes off, off becomes on).
* AND Gate: Needs all inputs to be on to turn on.
* OR Gate: Needs at least one input to be on to turn on.
* NAND Gate: Opposite of AND, turns off if all inputs are on.
* NOR Gate: Opposite of OR, turns off if at least one input is on.
With the billions of transistors you find in computers, you can make very complex logic systems with these simple building blocks of switches.
reading your answer to the other comments makes me think you want a deeper understanding of the mechanics, so this will go a little beyond eli5.
silicon is a semiconductor, this means it is sorta a conductor, but also sorta not. a pure silicon crystal is an insulator, but if you add a small amount of phosphorus or boron to the crystal, it be comes conductive, but in different ways. this is called “doping” and makes 2 different types of conductive silicon crystal n type (negativly charged) and p type (positivly charged). doping is localized and is done by laying down a mask chemical, etching it away where you want doping to happen, washing the wafer with the doping agent, then washing away the mask. this makes a pattern of a specific crystal structure.
if you put a bit of n type next to p type, electricity can only flow 1 way through it since one is negatively charged, and one is positively charged. this makes a diode.
if you take 2 n type sections, and put a very small p type section between, (or vice versa) you get a component that will block electricity flow both ways UNLESS the center section is neutralized by a current. this makes a transistor. there are 2 types of transistors pnp and npn, pnp requires the center to be grounded for electricity to flow, and npn requires the center to be powered.
using transistors you can turn on and off an electrical flow based on another electrical flow. you can use this to make logic gates like AND which turns on if both inputs are on, just link 2 transistors in series so current has to go through both.
with AND, OR (you get OR for free with electricity, just join 2 conductors together), and NOT (pnp transistor by its self) you can build a thing called a full adder which lets you add 2 binary digits (bits) togeter and can both accept and produce a carry bit (so 1+1= carry 1, result 0). full adders can be chained to add numbers as long as you want, and you can do a similar circut for multiplying.
https://www.geeksforgeeks.org/full-adder-in-digital-logic/
The ELI5 version of this is that computers are rune magic created by inscribing runes in crystals using sunlight, and then using alchemy and taim lightning to make it think, but I think you already know that part.
Latest Answers