Eli5: How are logic gates made?

340 views

Logic gates such as NAND can create other logic gates, but how are the very basic ones made and mass produced?

In: 4

6 Answers

Anonymous 0 Comments

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.

You are viewing 1 out of 6 answers, click here to view all answers.