Logic gates are generally made using transistors. Ready made logic chips are just chips with the transitors in the die already. The initial transistor are made by a processing called “doping” which alters the characteristics when electricity is passed through it. I don’t understand the process well enough to give an ELI5 answer however.
It looks like there are two questions here, so let me try rewording and answering them:
“What makes up a logic gate that is not itself a logic gate?”
Short answer, transistors. In digital circuitry, a transistor has three wires; an input, and output, and a gate. If the gate is off then the transistor will not allow current to flow from input to output, and if the gate is on then current can flow. With a mix of transistors and resistors, all of the basic logic gates can be produced
“How do we manufacture the large number of logic gates in a computer chip?”
We can make a transistor basically by laser printing. You coat the silicon with a chemical that turns into a transistor when exposed to light. You then use a series of lenses to shine a very small image of all the transistors that you want on that chip, and it becomes the desired arrangement.
Here’s an easy one to visualize: an AND gate.
Imagine a machine with two inputs and one output. The outputs can either be charged, or not charged. One of the inputs is connected directly to the output, but with a small gap. The other is connected to a coil which, when charged, will press an uncharged wire onto the gap to close it and complete the circuit. Boom, the output will only be charged when both inputs are charged.
More advanced gates scale up from this premise. You can learn more deeply in an interactive way at http://nandgame.com – it’s fun!
NAND and other logic gates are made out of transistors. They’re almost always made on a silicon wafer as part of a ‘chip’ (multiple transistors on a single piece of silicon), but they don’t have to be.
In fact, you can make your own NAND gate from two discrete transistors and a few resistors:
https://www.101computing.net/creating-logic-gates-using-transistors/
Using transistors. A transistor is like a wire that only allows a high voltage to pass through if if there’s also a high voltage coming into the third “gate” wire. This simple rule allows you to make the most basic logic gates.
This rule that a transistor follows is all thanks to a bit of a quirk in physics. It marries up our real world to the digital world.
Another handy quirk that people don’t really talk about is resistance. We use resistance to create the NOT gate, because a transistor on its own isn’t capable of this.
We only need to make 2 types of gate, OR and NOT. Creating other gates is just a combination of these.
We make each of them with transistors. Every transistor has 2 inputs and 1 output. (They are called the collector, emitter, and base)
For a NOT gate, we just need an NPN transistor. We keep a constant voltage on the emitter, and the collector will be our output. The base is how we toggle the transistor. An NPN transistor will only be open if there isn’t a voltage on the base, so if our base is unpowered, the collector is powered. If our base is powered, our collector is unpowered.
An OR gate is also very simple, we just two diodes to prevent the backward flow of electricity. Each flow into a single output, and if either input is on, the output is on.
We could make an AND gate with NOT((NOT p) OR (NOT q)) == p AND q, but we can also make one with a single transistor. If we take a PNP transistor, the emitter will be our output this time. The PNP transistor will only be open if there’s a voltage on the base, so only if both the collector and the base are powered will the emitter be powered.
NAND is simply NOT AND
NOR is simply NOT OR
XOR is a little more complicated, it (p AND (NOT q)) OR ((NOT p) AND q) == p XOR q
You can also construct some of these different ways, like NAND can be (NOT p) OR (NOT q)
And you can start constructing these together to start doing arithmetic. And XOR gate and a AND gate make a binary half adder. You then chain a bunch of these together, and you can do addition with arbitrarily large numbers. It all starts with a few transistors.
Latest Answers