HOME

TheInfoList



OR:

The NAND Boolean function has the property of
functional completeness In Mathematical logic, logic, a functionally complete set of logical connectives or Boolean function, Boolean operators is one that can be used to express all possible truth tables by combining members of the Set (mathematics), set into a Boolean ...
. This means that any Boolean expression can be re-expressed by an
equivalent Equivalence or Equivalent may refer to: Arts and entertainment *Album-equivalent unit, a measurement unit in the music industry *Equivalence class (music) *'' Equivalent VIII'', or ''The Bricks'', a minimalist sculpture by Carl Andre *'' Equiva ...
expression utilizing only NAND operations. For example, the function NOT(x) may be equivalently expressed as NAND(x,x). In the field of digital electronic circuits, this implies that it is possible to implement any
Boolean function In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually , or ). Alternative names are switching function, used especially in older computer science literature, and truth functi ...
using just
NAND gates In digital electronics, a NAND (NOT AND) gate is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the ...
. The mathematical proof for this was published by Henry M. Sheffer in 1913 in the ''
Transactions of the American Mathematical Society The ''Transactions of the American Mathematical Society'' is a monthly peer-reviewed scientific journal of pure and applied mathematics published by the American Mathematical Society. It was established in 1900. As a requirement, all articles must ...
'' (Sheffer 1913). A similar case applies to the NOR function, and this is referred to as
NOR logic A NOR gate or a NOT OR gate is a logic gate which gives a positive output only when both inputs are negative. Like NAND gates, NOR gates are so-called " universal gates" that can be combined to form any other kind of logic gate. For example, t ...
.


NAND

A NAND gate is an inverted
AND gate The AND gate is a basic digital logic gate that implements the logical conjunction (∧) from mathematical logic AND gates behave according to their truth table. A HIGH output (1) results only if all the inputs to the AND gate are HIGH (1). If a ...
. It has the following truth table: In
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss ", , ) is a type of MOSFET, metal–oxide–semiconductor field-effect transistor (MOSFET) semiconductor device fabrication, fabrication process that uses complementary an ...
logic, if both of the A and B inputs are high, then both the NMOS
transistors A transistor is a semiconductor device used to Electronic amplifier, amplify or electronic switch, switch electrical signals and electric power, power. It is one of the basic building blocks of modern electronics. It is composed of semicondu ...
(bottom half of the diagram) will conduct, neither of the PMOS transistors (top half) will conduct, and a conductive path will be established between the output and Vss (ground), bringing the output low. If both of the A and B inputs are low, then neither of the NMOS transistors will conduct, while both of the PMOS transistors will conduct, establishing a conductive path between the output and Vdd (voltage source), bringing the output high. If either of the A or B inputs is low, one of the NMOS transistors will not conduct, one of the PMOS transistors will, and a conductive path will be established between the output and Vdd (voltage source), bringing the output high. As the only configuration of the two inputs that results in a low output is when both are high, this circuit implements a NAND (NOT AND) logic gate.


Making other gates by using NAND gates

A NAND gate is a universal gate, meaning that any other gate can be represented as a combination of NAND gates.


NOT

A NOT gate is made by joining the inputs of a NAND gate together. Since a NAND gate is equivalent to an AND gate followed by a NOT gate, joining the inputs of a NAND gate leaves only the NOT gate.


AND

An AND gate is made by inverting the output of a NAND gate as shown below.


OR

If the truth table for a NAND gate is examined or by applying
De Morgan's laws In propositional calculus, propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both Validity (logic), valid rule of inference, rules of inference. They are nam ...
, it can be seen that if any of the inputs are 0, then the output will be 1. To be an OR gate, however, the output must be 1 if any input is 1. Therefore, if the inputs are inverted, any high input will trigger a high output.


NOR

A NOR gate is an OR gate with an inverted output. Output is high when neither input A nor input B is high.


XOR

An XOR gate is made by connecting four NAND gates as shown below. This construction entails a propagation delay three times that of a single NAND gate. Alternatively, an XOR gate is made by considering the
disjunctive normal form In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or in philosophical logic a ''cluster c ...
A \cdot \overline + \overline \cdot B, noting from
de Morgan's law In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathemat ...
that a NAND gate is an inverted-input OR gate. This construction uses five gates instead of four.


XNOR

An XNOR gate is made by considering the
disjunctive normal form In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or in philosophical logic a ''cluster c ...
A \cdot B + \overline \cdot \overline, noting from
de Morgan's law In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathemat ...
that a NAND gate is an inverted-input OR gate. This construction entails a propagation delay three times that of a single NAND gate and uses five gates. Alternatively, the 4-gate version of the XOR gate can be used with an inverter. This construction has a propagation delay four times (instead of three times) that of a single NAND gate.


MUX

A
multiplexer In electronics, a multiplexer (or mux; spelled sometimes as multiplexor), also known as a data selector, is a device that selects between several Analog signal, analog or Digital signal (electronics), digital input signals and forwards the sel ...
or a MUX gate is a three-input gate that uses one of the inputs, called the ''selector bit,'' to select one of the other two inputs, called ''data bits'', and outputs only the selected data bit.


DEMUX

A demultiplexer performs the opposite function of a multiplexer: It takes a single input and channels it to one of two possible outputs according to a selector bit that specifies which output to choose.


See also

*
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss ", , ) is a type of MOSFET, metal–oxide–semiconductor field-effect transistor (MOSFET) semiconductor device fabrication, fabrication process that uses complementary an ...
transistor structures and chip deposition geometries that produce NAND logic elements *
Sheffer stroke In Boolean functions and propositional calculus, the Sheffer stroke denotes a logical operation that is equivalent to the negation of the conjunction operation, expressed in ordinary language as "not both". It is also called non-conjunction, ...
– other name *
NOR logic A NOR gate or a NOT OR gate is a logic gate which gives a positive output only when both inputs are negative. Like NAND gates, NOR gates are so-called " universal gates" that can be combined to form any other kind of logic gate. For example, t ...
– like NAND gates, NOR gates are also universal gates *
Functional completeness In Mathematical logic, logic, a functionally complete set of logical connectives or Boolean function, Boolean operators is one that can be used to express all possible truth tables by combining members of the Set (mathematics), set into a Boolean ...


References

* *


External links


TTL NAND and AND gates
– All About Circuits * {{webarchive , url=https://web.archive.org/web/20240611122229/https://www.fullchipdesign.com/drive_xor_nand_interview.htm , date=June 11, 2024 , title=Drive XOR using either NAND gates or NOR gates.
NandGame
– a game about building a computer using only NAND gates Logic gates