0% found this document useful (0 votes)
42 views13 pages

Logic Gates (Revision)

The document discusses different logic gates including inverters, AND gates, OR gates, NAND gates, NOR gates, XOR gates, and XNOR gates. It provides truth tables and example waveforms for each gate and discusses how they can be used to perform Boolean logic operations and how NAND and NOR gates are considered universal gates.

Uploaded by

Hazim Khadri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views13 pages

Logic Gates (Revision)

The document discusses different logic gates including inverters, AND gates, OR gates, NAND gates, NOR gates, XOR gates, and XNOR gates. It provides truth tables and example waveforms for each gate and discusses how they can be used to perform Boolean logic operations and how NAND and NOR gates are considered universal gates.

Uploaded by

Hazim Khadri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

NMK10803 DIGITAL SYSTEMS

LOGIC GATES
REVISION
Disclaimer:
Most of the contents (if not all) are extracted from resources available for Digital Fundamentals 10th Edition.
REVISION
THE INVERTER
The inverter performs the Boolean NOT operation. When the input is LOW, the output is HIGH; when the input is
HIGH, the output is LOW.
The NOT operation (complement) is shown with an overbar. Thus, the Boolean expression for an inverter is
Input Output Example waveforms:

A X
LOW (0) HIGH (1)
HIGH (1) LOW(0)
A group of inverters can be used to form the 1’s complement (toggling all bits in it, i.e., transforming the 0 bit to 1 and
the 1 bit to 0) of a binary number:
REVISION
THE AND GATE
The AND gate produces a HIGH output when all inputs are HIGH; otherwise, the output is LOW. For a 2-input gate,
the truth table is

Example Waveforms

The AND operation is usually shown with a dot between the variables, but it may be implied (no dot). Thus, the
AND operation
The AND is written
operation is usedasinXcomputer
= A .B or programming
X = AB. as a selective mask. If you want to retain certain bits of a
binary number but reset the other bits to 0, you could set a mask with 1’s in the position of the retained bits.
If the binary number 10100011 is ANDed with the mask 00001111, what is the
EXAMPLE result? 00000011
REVISION
THE OR GATE
The OR gate produces a HIGH output if any input is HIGH; if all inputs are LOW, the output is LOW. For a 2-input
gate, the truth table is

Inputs Output
A B X
0 0 0
0 1 1
1 0 1
1 1 1
The OR operation is shown with a plus sign (+) between the variables. Thus, the OR operation is written as X = A +
B.

Example Waveforms

* The OR operation can be used in computer


programming to set certain bits of a binary
number to 1.
REVISION

THE OR GATE
EXAMPLE
ASCII letters have a 1 in the bit 5 position for lower case letters and a 0 in this position for capitals. (Bit positions are
numbered from right to left starting with 0.) What will be the result if you OR an ASCII letter with the 8-bit mask
00100000?

The resulting letter will be lower case.


REVISION
THE NAND GATE
The NAND gate produces a LOW output when all inputs are HIGH; otherwise, the output is HIGH. For a 2-
input gate, the truth table is

The NAND operation is shown with a dot between the variables and an overbar covering them. Thus, the NAND
operation is written as X = A .B (Alternatively, X = AB.)

The NAND gate is particularly useful because


Example Waveforms it is a “universal” gate – all other basic gates
can be constructed from NAND gates.
REVISION

THE UNIVERSAL GATES


NAND gates are sometimes called universal gates because they can be used to produce the other basic Boolean
functions.
REVISION
THE NOR GATE
The NOR gate produces a LOW output if any input is HIGH; if all inputs are HIGH, the output is LOW. For a 2-
input gate, the truth table is

The NOR operation is shown with a plus sign (+) between the variables and an overbar covering them. Thus, the
NOR operation is written as X = A + B.

The NOR operation will produce a


Example Waveforms LOW if any input is HIGH.
REVISION

THE UNIVERSAL GATES


NOR gates are also universal gates and can forn all the basic gates.
REVISION

THE XOR GATE


The XOR gate produces a HIGH output only when both inputs are at opposite logic levels. The truth table is

The XOR operation is written as Alternatively, it can be written


with a circled plus sign between the variables as

EXAMPLE
Notice that the If the A and B waveforms are both inverted
XOR gate will for the above waveforms, how is the output
Example Waveforms produce a affected?
HIGH only
when exactly There is no change in the output.
one input is
HIGH.
REVISION
THE XNOR GATE
The XNOR gate produces a HIGH output only when both inputs are at the same logic level. The truth table is

The XNOR operation shown as Alternatively, the


XNOR operation can be shown with a circled dot between the
variables. Thus, it can be shown as

Example Waveforms
EXAMPLE
If the Awaveform is inverted but Bremains the same, how is the
output affected?

The output will be inverted.


THANK YOU

You might also like