170 likes | 502 Views
Primitive Logic Functions. Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya). Intro (AND). Intro (OR). AND and OR.
E N D
Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)
AND and OR • Logic functions such as AND and OR are generic concepts that can be implemented in a variety of ways, including switches as illustrated above, transistors for use in computers, and even pneumatic devices for use in hostile environments such as steel works or nuclear reactors. • Thus, instead of drawing circuits using light switches, it is preferable to make use of more abstract forms of representation. • This permits designers to specify the function of systems with minimal consideration as to their final physical realization. • To facilitate this, special symbols are employed to represent logic functions, and truth table assignments are specified using the abstract terms FALSE and TRUE. • This is because assignments such as OPEN, CLOSED, ON, and OFF may imply a particular implementation.
BUF and NOT Functions The simplest of all the logic functions are known as BUF and NOT
BUF and NOT Functions (Cont.) • The output of the BUF function has the same value as the input to the function; if the input is FALSE the output is FALSE, and if the input is TRUE the output is TRUE. • By comparison, on the output of the NOT symbol indicates an inverting function; if the input is FALSE the output is TRUE, and if the input is TRUE the output is FALSE. • A commonly-used alternative name for a NOT function is INV (short for inverter).
BUF and NOT Functions (Cont.) • Now consider the effect of connecting two NOT functions in series (one after the other) • The first NOT gate inverts the value from the input, and the second NOT gate inverts it back again. • The end result is equivalent to that of a BUF function, except that each NOT contributes an element of delay.
AND, OR, and XOR Functions • The AND and OR representations shown here are the abstract equivalentsof our original switch examples. • In the case of the AND, the output is only TRUE if both a and b are TRUE
AND, OR, and XOR Functions • In the case of the OR, the output is TRUE if either a or b are TRUE. • In fact, the OR should more properly be called an inclusive-OR, because the TRUE output cases include the case when both inputs are TRUE.
AND, OR, and XOR Functions • Contrast this with the exclusive-OR, or XOR, where the TRUE output cases exclude the case when both inputs are TRUE.
NAND, NOR, and XNOR Functions • Now consider the effect of appending a NOT function to the output of the AND function • This combination of functions occurs frequently in designs. Similarly, the outputs of the OR and XOR functions are often inverted with NOT functions. • This leads to three more primitive functions called NAND (NOT-AND), NOR (NOT-OR) and NXOR (NOT-XOR). • In practice, however, the NXOR is almost always referred to as an XNOR (exclusive-NOR)
NAND, NOR, and XNOR Functions • NAND • NOR
Logic Functions • In reality there are only eight simple functions (BUF, NOT, AND, NAND, OR, NOR, XOR, and XNOR) from which everything else is constructed. • In fact, some might argue that there are only seven core functions because you can construct a BUF out of two NOTs, as was discussed earlier.
NAND • Actually, if you want to go down this path, you can construct all of the above functions using one or more NAND gates (or one or more NOR gates). • For example, if you connect the two inputs of a NAND gate together, you end up with a NOT
NAND • We also know that if we invert the output from a NAND, we end up with an AND. • So we could append a NAND configured as a NOT to the output of another NAND to generate an AND
Functions versus Gates • Simple functions such as BUF, NOT, AND, NAND, OR, NOR, XOR, and XNOR are often known as primitive gates, primitives, logic gates, or simply gates. • Strictly speaking, the term logic functionimplies an abstract mathematical relationship, while logic gateimplies an underlying physical implementation. • More complex functions can be constructed by combining primitive gates in different ways.