Electronic – What are logic gates


So from what I understand transistors are one of the most important electronic elements for computers because of TTL (Transistors-Transistors Logic).

Is this true? If so, how exactly does this work? I have heard the terms "logic gate" and "logic block" tossed around.

Best Answer

Trying to define what is the "most important" element of a circuit is pointless.

As for what a logic gate is, it's a circuit that operates on signals with discrete states. Overwhelmingly, this is done using two states only, high and low. There are good electrical reasons for why two states is much easier to deal with and operate on than multiple states in a single signal. There is more detail on that here.

Therefore, in practise, "logic gate" refers to something that manipulates binary signals. Since the two states can be thought of as representing true and false, the world of Boolean logic theory can be applied to these systems. The simplest logic gate of all is the inverter, which performs the boolean NOT function. The next more complicated are the 2-input 1-output logic gates. These have function like AND, NAND, OR, NOR, and XOR.

In theory (going back to boolean logic), you can build up any more complex function from only NAND or NOR gates, although making those complex function more explicitly from a bunch of transistors is often more efficient.

From the basic building blocks above, it is possible to construct flip-flop, counters, adders, etc, etc, etc. A whole processor will contain many of these things, which all eventually decompose down to transistors. Nowadays we have high level logic design tools so that humans specify the high level logic to perform, and the tools automatically generate the sea of transistors required to realize it.