Lesson 2: Transistors & Logic Gates
In the previous lesson we saw that the transistor sits at the bottom of the computer. Now we'll understand what it actually does: it's an electrical switch whose 'on' or 'off' state is controlled by a voltage. We won't dive into the chemistry or physics of manufacturing — the idea of a controlled sw
A transistor is a tiny electrical faucet: one signal decides whether current flows or not. Wire a few such faucets together in different shapes and you get 'gates' that answer simple yes/no questions — and that's all you need to build a computer.
- Transistor
- A voltage-controlled electrical switch: a signal at the control input decides whether current flows between two points. On/off represents 1/0.
- Logic Gate
- A component built from several transistors that takes one or more input bits and produces an output bit according to a fixed logical rule.
- NOT Gate (Inverter)
- A single-input gate that flips the bit: 0 becomes 1 and 1 becomes 0.
- AND Gate
- Its output is 1 only when all inputs are 1; otherwise the output is 0.
- OR Gate
- Its output is 1 when at least one input is 1; the output is 0 only when both inputs are 0.
- XOR Gate
- Its output is 1 when the inputs differ (one 0 and the other 1), and 0 when they are equal.
- NAND Gate
- The inverse of AND: its output is 0 only when all inputs are 1, and 1 in every other case. A universal gate.
- Truth Table
- A table listing the gate's output for every possible combination of input values.
- Universal Gate
- A gate from which alone any other logical function can be built. NAND and NOR are universal gates.