Logic Gates and Boolean Algebra

Logic Gates and Boolean Algebra

At the lowest level, a computer's circuits make decisions using logic gates, tiny electronic components that take one or more binary inputs and produce a binary output according to fixed rules. By combining gates, engineers build everything from the ALU's adders to the control logic that steers the instruction cycle. The mathematics that describes these gates is Boolean algebra, which works with just two values: true (1) and false (0).

The basic gates and their truth tables

A truth table lists every possible combination of inputs and the output the gate produces for each. The fundamental gates are:

  • NOT (inverter): one input, one output. It outputs the opposite of its input. NOT 0 = 1 and NOT 1 = 0. In Boolean notation it is written $\bar{A}$ or $\lnot A$.
  • AND: output is 1 only when all in