You are on page 1of 21

LOGIC GATES

Logic gates:

AND,
OR,
NOT,
NAND,
NOR,
XOR, &
XNOR Gates,

Laws and Rules of Boolean algebra


DIGITAL LOGIC GATES
basic building blocks of any digital system

makes logical decisions based on combinations of input signals

electronic circuit with one or more input BUT only one output.

two binary state low (0) or high (1), represented by voltage levels 0V and
+5V respectively

Seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.

complex operations can be performed using combinations of logic gates

In theory, no limit to the number of gates that can be placed in single


device. But in practice, physical space is the limitation

e.g. As integrated circuits technology advances, the physical volume for each
individual logic gate decreases and digital devices of the same or smaller size become
capable of performing ever-more-complicated operations at ever-increasing speeds.
AND Gate
Logic AND Gate produces output at logic level “0” and only goes “HIGH”
to a logic level “1” when ALL of its inputs are at logic level “1”.
2-input Logic AND Gate
Truth Table

logic or Boolean expression denoted by


single dot (.), (&) or multiplication
A.B = Y or
A&B=Y or
AB = Y
The output is "true" when
True : 1 all inputs are "true.”
False: 0 i.e.
“If both A and B are true,
then Y is true”

Can you create a Truth table for 3-input Logic AND Gate?
3-input Logic AND Gate Q = ???
OR Gate
Logic OR Gate or Inclusive-OR gate normally produces output which is
at logic level “0” and only goes “HIGH” to a logic level “1” when one or
more of its inputs are at logic level “1”.
2-input Logic OR Gate
Truth Table

logic or Boolean expression denoted by a


plus sign, ( + : Logical Addition) A+B = Y.

“If either A or B is true,


then Y is true”

Read as A OR B gives Y

Draw 3-input Logic OR Gate and build a truth table ????


NOT Gate
Most basic of all the logical gates

Also know as Inverting Buffer or a Digital Inverter.

has only one input and It reverses/inverts/compliments the logic state of


input signal.

NOT gate returns “HIGH” only when its input is at logic level “0”

Boolean expression: Ā = Y.

“If A is NOT true, then Y is


true”
NAND Gate
A NOT-AND operation is known as NAND operation.

combination of the AND gate with NOT gate connected together in series.

Produces output at logic level “1” and only goes “LOW” (“0”) when ALL
of its inputs are at logic level “1”.
___
Boolean expression of: A.B = Y.

“If both A and B is not true,


then Y is true”

Draw 3-input Logic OR Gate and build a truth table ????


NAND Gate
NAND Gate equivalent circuit
NOR Gate
NOR gate is a combination of OR gate followed by an NOT gate

Produces output at logic level “1” and only goes “LOW” to logic level “0”
when ANY of its inputs are at logic level “1”.

Its output is "true" if both inputs are "false.” else, the output is "false.”
____
Boolean expression of: A + B = Y.

“If both A and B are NOT


true, then Y is true”

Draw 3-input Logic NOR Gate and build a truth table ????
NOR Gate
NOR Gate equivalent circuit
EX-OR / XOR Gate
It can be used in the half adder, full adder and subtractor.

The output is "true" if either, but not both, of the inputs are "true." The
output is "false" if both inputs are "false" or if both inputs are "true.”
_ _
Boolean expression of: Y = A.B + A.B

Ex-OR gate produces logic “1” ONLY when there are an ODD number of
1’s on the inputs to the gate, if the two numbers are equal, the output is
“0”.

“If either A and B BUT


not BOTH are true,
then Y is true”

Draw 3-input Logic EX-OR Gate and build a truth table ????
EX-OR / XOR Gate
Exclusive-OR Gate equivalent circuit
EX-NOR / XNOR Gate
Exclusive-NOR Gate is the reverse/complementary of Ex-OR

combination XOR gate followed by an NOT.

Its output is "true" if the inputs are the same, and "false" if the inputs are
different.
___
Boolean expression of: Y = AB + AB

Exclusive-NOR gate will give an output value of


logic “1” ONLY when there are an EVEN number
of 1’s on the inputs to the gate
(the inverse of the Ex-OR gate)
except when all its inputs are “LOW”.

Draw 3-input Logic EX-OR Gate and build a truth table ????
EX-NOR / XNOR Gate
Exclusive-NOR Gate equivalent circuit
Logic gate symbols
Logic gate symbols
Example: X =(A+B’)+[(A’+C)]’ where (A,B,C)=(1,1,0):

SOLVE:
1.  Draw a circuit diagram corresponding to the following Boolean expression: (A + B).(B + C)

2.  Draw a circuit diagram corresponding to the following Boolean expression: (A.B + C).D

3.  Draw a circuit diagram corresponding to the following Boolean expression: A’.B + (B+C)’

4.  Draw a circuit diagram corresponding to the following Boolean expression: (A.B)’ + (C.D)’

5.  Show the behavior of the following circuit with a truth table:
ANSWERS
1.  Draw a circuit diagram : (A + B)(B + C)

2.  Draw a circuit diagram : (AB + C).D

3.  Draw a circuit diagram : A’.B + (B+C)’

4.  Draw a circuit diagram : (A.B)’ + (C.D)’

5.  Show the behavior of the following circuit with a truth table:
Rules of Boolean algebra
A set of rules to help reduce the number of logic gates needed to perform
a particular logic operation

Boolean Algebra is the mathematics used to analyse digital gates and


circuits.

1 : Commutative Law
(a) A + B = B + A (b) A.B = B.A

2 : Associate Law
(a) (A + B) + C = A + (B + C) (b) (A.B).C = A.(B.C)

3 : Distributive Law
(a) A.(B + C) = A.B + A.C (b) A + (B.C) = (A + B) (A + C)
Laws of Boolean algebra
1. A + A = A 2. A.A = A 14. [(A’)]’ = A

3. A.B + A.B’ 3. (A+B).(A+B’)

4. A + A.B = A 5. A.(A + B) = A

6. A + 0 = A 7. A.0 = 0

8. A + 1 = 1 9. A.1 = A

10. A + A’ = 1 11. A.A’ =0

12. (A’ + B) = A.B 13. A + A’.B = A + B

De Morgan's Theorem
(a) (A+B)’ = A’.B’ (b) (A.B)’ = A’ + B’
Laws and Rules of Boolean algebra
Examples:

Prove T10 : (a) A + A’.B = A + B

(1)  Algebraically: A + A’.B = A.1 + A’.B


= A.(1 + B) + A’.B
= A + A.B + A’.B
= A + B.(A + A’)
=A+B
(2) Using the truth table:
Laws and Rules of Boolean algebra
Prove De Morgan's Theorem ????

a. (A + B)’ = A’.B’ b. (A.B’) = A’ + B’

INPUTS OUTPUTS
A B (A+B)' A'.B' (A.B)' A'+B'
0 0 1 1 1 1
0 1 0 0 1 1
1 0 0 0 1 1
1 1 0 0 0 0

Verify it in Lab using Digital-Works 3.40


Logic gate Quiz Answers….
1.  B
2.  B
3.  D
4.  C
5.  A
6.  B
7.  D
8.  B
9.  C
10.  D

Check this link to self-learn about various computer components / Assembly

http://umhelena.edu/VirtualComputers/Laptop/en_ITEPC_VA_Laptop_v40/

http://umhelena.edu/VirtualComputers/Desktop/en_ITEPC_VA_Desktop_v40/

You might also like