primitive logic functions kuliah sistem digital, teknik elektro umy (rahmat adiprasetya)

17
Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

Upload: claude-lamb

Post on 18-Jan-2018

219 views

Category:

Documents


0 download

DESCRIPTION

Intro (OR)

TRANSCRIPT

Page 1: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

Primitive Logic Functions

Kuliah Sistem Digital, Teknik Elektro UMY(Rahmat Adiprasetya)

Page 2: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

Intro (AND)

Page 3: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

Intro (OR)

Page 4: 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.

Page 5: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

BUF and NOT FunctionsThe simplest of all the logic functions are known as BUF and NOT

Page 6: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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).

Page 7: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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.

Page 8: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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

Page 9: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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.

Page 10: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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.

Page 11: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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)

Page 12: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

NAND, NOR, and XNOR Functions NAND

NOR

Page 13: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

NAND, NOR, and XNOR Functions XNOR

Page 14: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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.

Page 15: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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

Page 16: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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

Page 17: Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)

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 function implies an abstract mathematical relationship, while logic gate implies an underlying physical implementation.

More complex functions can be constructed by combining primitive gates in different ways.