Logic gate
Adapted from Wikipedia · Discoverer experience
A logic gate is a special device that helps computers and other electronic tools make decisions. It takes one or more simple yes-or-no signals, called binary inputs, and turns them into one yes-or-no signal as its output. This is based on something called a Boolean function, which is a way to describe logical relationships.
Logic gates are built using tiny parts like diodes or transistors, which act like electronic switches. Today, most logic gates are made from tiny parts called MOSFETs, but they can also be made using other methods like vacuum tubes or even mechanical parts.
Because logic gates can be connected together in many ways, they can perform very complex tasks. This lets them build the foundation for all kinds of computer parts, from simple switches to whole microprocessors, which can have over 100 million logic gates inside them.
There are seven basic types of logic gates, such as NOT, OR, AND, and XOR, each doing a different kind of logical operation. These basic gates are the building blocks for more complicated circuits and help computers follow instructions and solve problems. Boolean logic is the system that these gates follow, allowing all modern computing and mathematics to work.
History and development
The binary number system was refined by Gottfried Wilhelm Leibniz, who was inspired by the ancient I Ching. Leibniz showed how binary numbers could combine arithmetic and logic.
Early computers used mechanical parts like gears as logic gates. Later, scientists discovered that electrical switches could perform logical operations. This idea became the basis for modern electronic computers. Over time, new technologies like transistors improved these switches, leading to faster and smaller computers.
Symbols
There are two main sets of symbols used for basic logic gates. Both sets are defined in special rules made by groups that set standards. One set, called the “distinctive shape,” looks like old drawings and comes from rules made by the United States Military a long time ago. The other set, called the “rectangular shape,” uses simple rectangle outlines and can show many more types of devices.
These symbols help people draw and understand complicated parts of computers and other digital devices, from small counters to big microprocessors.
De Morgan equivalent symbols
By using De Morgan's laws, an AND function can look like an OR function if we flip the inputs and outputs. The same goes for an OR function looking like an AND function with flipped inputs and outputs. This idea helps make logic diagrams easier to understand and avoid mistakes.
De Morgan symbols show the main purpose of a gate and the correct polarity of its nodes. For example, a two-input NAND gate used to turn on a motor when either input is off can be shown more clearly with a De Morgan symbol. This makes it easier to see how the gate works in real circuits.
Truth tables
| Input | Output | |
| A | Buffer | Inverter |
| 0 | 0 | 1 |
| 1 | 1 | 0 |
| Input | Output | ||||||||
| A | B | AND | NAND | OR | NOR | XOR | XNOR | IMPLY | NIMPLY |
| 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |
Universal logic gates
Further informationon the theoretical basis: Functional completeness
Charles Sanders Peirce discovered that special types of logic gates, like NOR gates or NAND gates, can do the work of all other logic gates. However, his findings were not shared until much later. The first person to publish this idea was Henry M. Sheffer in 1913. Because of this, the NAND operation is sometimes called the Sheffer stroke, and the NOR operation is called Peirce's arrow. These gates are important because they can replace any other logic gate, which is why they are called universal logic gates.
| Type | NAND construction | NOR construction |
|---|---|---|
| NOT | ||
| AND | ||
| NAND | ||
| OR | ||
| NOR | ||
| XOR | ||
| XNOR | ||
| IMPLY | ||
| NIMPLY |
Data storage and sequential logic
Main article: Sequential logic
Logic gates can be used to remember information, which helps store data. By connecting several gates together in a special way called a "latch", we can create a small memory unit. These circuits are used in a type of computer memory called static random-access memory.
More advanced designs use timing signals called clock signals to change state only at certain moments. These are called edge-triggered "flip-flops". A flip-flop can stay in one of two states for a long time, making it a bistable circuit. When many flip-flops work together, they can store numbers, forming a register. Because these circuits can remember past information, they are part of a sequential logic system. This is different from combinational logic, where the output depends only on the current inputs.
Manufacturing
See also: Unconventional computing and Semiconductor device fabrication
Electronic gates
A functionally complete logic system can be made from relays, valves (vacuum tubes), or transistors.
Electronic logic gates are very different from older relay-and-switch types. They work much faster, use far less power, and are tiny — often a million times smaller. They also work in a special way. Instead of letting current flow through like a switch, these gates act like amplifiers. They use a tiny amount of current at the input to create a strong signal at the output, and current cannot flow backward between the input and output.
For small logic systems, designers use ready-made logic gates from groups of devices like the TTL 7400 series by Texas Instruments and the CMOS 4000 series by RCA. Today, many of these fixed logic gates are being replaced by programmable logic devices, which let designers fit many different logic functions into one small chip. Because these devices can be reprogrammed, the way a hardware system works can be changed after it is built.
An important benefit of these standard logic families is that the output of one gate can connect to the inputs of other gates. This lets designers build very complex systems without needing to understand how each gate works inside, as long as they follow the rules for each type of chip.
There are different types of logic families, each with its own features like speed, power use, and cost. Examples include RDL (resistor–diode logic), RTL (resistor–transistor logic), DTL (diode–transistor logic), TTL (transistor–transistor logic), and CMOS (complementary metal–oxide–semiconductor). CMOS is now the most common because it uses very little power while still working quickly.
Other types of logic gates include, but are not limited to:
Three-state logic gates
Main article: Three-state logic
A three-state logic gate can have three outputs: high (H), low (L), and high-impedance (Z). The high-impedance state doesn’t affect the logic, which stays binary. These gates are used on buses of the CPU to let many chips send data. A group of three-state outputs with the right control circuit works like a multiplexer.
In electronics, a high output means the gate is sending current from the positive power source. A low output means it is sending current to the negative power source. High impedance means the output is disconnected from the circuit.
Non-electronic logic gates
Non-electronic logic gates exist but are rarely used today. Early computers, like the Harvard Mark I, used electromechanical relays. Logic gates can also be made with air pressure, molecules, DNA (see DNA nanotechnology), or even quantum effects. Any method that can create a complete logic system, like a NOR or NAND gate, can be used to build digital circuits.
| Logic family | Abbreviation | Description |
|---|---|---|
| Diode logic | DL | |
| Tunnel diode logic | TDL | Exactly the same as diode logic but can perform at a higher speed. |
| Neon logic | NL | Uses neon bulbs or 3-element neon trigger tubes to perform logic. |
| Core diode logic | CDL | Performed by semiconductor diodes and small ferrite toroidal cores for moderate speed and moderate power level. |
| 4Layer Device Logic | 4LDL | Uses thyristors and SCRs to perform logic operations where high current and or high voltages are required. |
| Direct-coupled transistor logic | DCTL | Uses transistors switching between saturated and cutoff states to perform logic. The transistors require carefully controlled parameters. Economical because few other components are needed, but tends to be susceptible to noise because of the lower voltage levels employed. Often considered to be the father to modern TTL logic. |
| Metal–oxide–semiconductor logic | MOS | Uses MOSFETs (metal–oxide–semiconductor field-effect transistors), the basis for most modern logic gates. The MOS logic family includes PMOS logic, NMOS logic, complementary MOS (CMOS), and BiCMOS (bipolar CMOS). |
| Current-mode logic | CML | Uses transistors to perform logic but biasing is from constant current sources to prevent saturation and allow extremely fast switching. Has high noise immunity despite fairly low logic levels. |
| Quantum-dot cellular automata | QCA | Uses tunnelable q-bits for synthesizing the binary logic bits. The electrostatic repulsive force in between two electrons in the quantum dots assigns the electron configurations (that defines state 1 or state 0) under the suitably driven polarizations. This is a transistorless, currentless, junctionless binary logic synthesis technique allowing it to have very fast operation speeds. |
| Ferroelectric FET | FeFET | FeFET transistors can retain their state to speed recovery in case of a power loss. |
Images
Related articles
This article is a child-friendly adaptation of the Wikipedia article on Logic gate, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.
Safekipedia