Logic Gate
Logic gates perform basic logical operations and serve as the building blocks of digital circuits. Most logic gates take one or two binary values (0 or 1) as inputs and produce a single binary output. Basic circuits contain only a few logic gates, while complex ones — such as microprocessors — may contain millions.
There are eight primary types of logic gates, each with a specific Boolean function. Their names and symbols (used in logic gate diagrams) are listed below.
The table below explains the function of each logic gate, with example inputs and outputs.
Gate | Description | Example (A, B → Output) |
---|---|---|
AND | True if both A and B are True | (1,1 → 1) ; (0,1 → 0) |
NAND | AND followed by NOT (False only if both A and B are True) | (1,1 → 0) |
OR | True if either A or B is True | (1,0 → 1) ; (0,0 → 0) |
NOR | OR followed by NOT (True only if both A and B are False | (0,0 → 1) |
Buffer | Outputs the same value as the input, often used to strengthen a signal | (1 → 1) ; (0 → 0) |
NOT | Inverts the input value | (1 → 0) ; (0 → 1) |
XOR | True if only one of A or B is True | (1,0 → 1) ; (1,1 → 0) |
XNOR | XOR followed by NOT (True if A and B are both the same) | (1,1 → 1) ; (0,0 → 1) |
By combining thousands or even millions of logic gates, digital circuits can perform highly complex computations. The number of logic gates on an integrated circuit depends on the chip's size and the transistor size used to build them. Typically, there is an inverse correlation between processor performance and transistor size. Processors with smaller transistors are generally more powerful and efficient than those with larger ones.