Logic Gates Logic Gates: Most Difficult Reading Topics
Logic Gates Logic Gates: Most Difficult Reading Topics
Logic Gates Logic Gates: Most Difficult Reading Topics
LOGIC GATES
COMP370 Introduction to Computer Architecture
Logic
Formal logic is a branch of mathematics th ti that th t deals d l with true and false values instead of numbers. In the mid-19th century, George Bool developed many Logic ideas. Boolean logic deals with equations where the operators are AND or OR instead of add and multiply.
Electric Logic
Logical values can easily be expressed by an electrical l t i l circuit. i it True or 1 can be defined as voltage on a wire while False or 0 can be defined as no voltage. We will use positive logic. Analog values can be anything while digital only has discrete values, 0 or 1 Electrical devices called gates can implement the logical
AND gate
The AND gate is an electronic circuit that gives a true output (1) only if all its inputs are true. A dot () is used to show the AND operation i.e. AB. Note that the dot is sometimes omitted i.e. AB
inputs
output
OR gate
The OR gate is an electronic circuit that gives a true output (1) if one or more of its inputs are true. A plus (+) is used to show the OR operation.
NOT gate
The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This is also shown as A', or with a bar over the top A A 0 1 1 0
NAND gate
This is a NOT-AND gate which is equal t an AND gate to t followed f ll d by b a NOT gate. The outputs of all NAND gates are true if any of the inputs are false. The symbol is an AND gate with a small circle on the output. The small circle represents inversion.
Logical Equivalence
A NAND gate gives the same results as an AND gate feeding into a NOT gate. Circuits are logically equivalent if they produce the same truth table output.
NAND as a NOT
Below are two ways that a NAND gate can be b configured fi d to t produce d a NOT gate. They are logically equivalent. It can also be done using NOR logic gates in the same way.
A 0 0 1 1
B AB NOT AB NAND AB 0 0 1 1 1 0 1 1 0 0 1 1 1 1 0 0
A 0 1
A 0 1
NAND AA 1 0
A 0 1
1 1 1
NAND A 1 0
NOR gate
This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. gate The outputs of all NOR gates are false if any of the inputs are true. The symbol is an OR gate with a small circle on the output. The small circle represents inversion. inversion
EXOR gate
The 'Exclusive-OR' gate is a circuit which will ill give i a true t output t t if either, ith but b t not t both, of its two inputs are true. An encircled plus sign ( ) is used to show the EOR operation.
EXNOR gate
The 'Exclusive-NOR' gate circuit does th opposite the it t to the th EOR gate. t It will give a false output if either, but not both, of its two inputs are true. The symbol is an EXOR gate with a small circle on the output. output The small circle represents inversion.
Truth Table
Logic gates representation using the T th t Truth table bl
Try it
Draw the circuit diagrams like the ones below b l t show to h how h a NOR gate t can be made into a NOT gate.
NOR Inverter
Wiring the NOR gate to become an i inverter t
Connecting Gates
The output of one logic gate can be used as the th input i t to t another th logic l i gate. t The output of one gate can be used as the inputs to several other gates.