0% found this document useful (0 votes)
148 views22 pages

Logic Gates

This document describes several types of logic gates: AND, OR, NOT, NAND, NOR, XOR, and XNOR. It provides electrical diagrams and truth tables to illustrate the input and output behavior of each gate. Boolean algebra notation is also shown for how to represent each gate using algebraic expressions with variables for the inputs and outputs. Logic gates are basic digital circuits that allow signals to pass through or be blocked depending on the input values, and they are used to perform operations like addition and reasoning in computers.

Uploaded by

Hassan Alaradi
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)
148 views22 pages

Logic Gates

This document describes several types of logic gates: AND, OR, NOT, NAND, NOR, XOR, and XNOR. It provides electrical diagrams and truth tables to illustrate the input and output behavior of each gate. Boolean algebra notation is also shown for how to represent each gate using algebraic expressions with variables for the inputs and outputs. Logic gates are basic digital circuits that allow signals to pass through or be blocked depending on the input values, and they are used to perform operations like addition and reasoning in computers.

Uploaded by

Hassan Alaradi
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/ 22

Logic Gates

(AND, OR, NOT


Logic Gates)
Logic Gates

Communication signals may be:

•Analogue (continuously varying)

•Digital (only on and off)


Logic Gates

Analogue Signal

analogue signals can vary


in frequency, amplitude
or both.
Logic Gates

Digital Signal

Digital signals are a series of


pulses consisting of just two
states, ON (1) or OFF (0).
There are no values in between.
A logic gate is a digital circuit which either allows a signal to pass through it or
to stop it.

There are seven basic logic gates: NOT,AND, OR,NAND, NOR,XOR and XNOR.

NOT OR AN
GAT GAT
E D
E GAT
E
Did you know? ?
Logic gates allow the computer to do things Logic !
such as add, divide, multiply, do simple yes
and no reasoning in certain situations along
with other things.
AND Gate
Supply

=0 =0
Switch is open Switch is open Lamp

Input Input Output The is an electrical diagram that


represents two switches acting in
0 0 0 series (eg one following another)

1 0 0
The AND logic gate can also be
0 1 0 represented by a truth table.

1 1 1
Truth table

Logic gates
AND Gate
Here is how we can represent an AND LOGIC GATE using Boolean algebra.

X .Y = Q
(where ‘.’ sign represents an ‘AND’ logic gate)

[SWITCH X (open)] . [SWITCH Y (open)] = [LAMP OFF]


[SWITCH X (open)] . [SWITCH Y (closed)] = [LAMP OFF]
[SWITCH X (closed)] . [SWITCH Y (open)] = [LAMP OFF]
[SWITCH X (closed)] . [SWITCH Y (closed)] = [LAMP ON]

Logic gates
OR Gate
Here is an electrical Supply =0
diagram representing two Switch is
switches acting in parallel open
together.
Switch is
open Lamp
Input Input Output
=0
0 0 0

1 0 1
The switch states can be
0 1 1 represented by a truth table.

1 1 1 This represents the switching


states inside an OR logic gate.
Truth table

Logic gates
OR Gate

Here is how we can represent an OR GATE using Boolean algebra.

X + Y = Q
(where ‘+’ sign represents an ‘OR’ logic gate)

[SWITCH X (open)] + [SWITCH Y (open)] = [LAMP OFF]


[SWITCH X (open)] + [SWITCH Y (closed)] = [LAMP ON]
[SWITCH X (closed)] + [SWITCH Y (open)] = [LAMP ON]
[SWITCH X (closed)] + [SWITCH Y (closed)] = [LAMP ON]

Logic gates
NOT Gate

An electrical current is inverted


from one signal to another signal.
Supply

=0 =1
X X
Invertor

Input (X) Output (Y)


Here is the simple truth table for
0 1 a NOT logic gate.

1 0

Logic gates
Here are the two states represented by
NOT Gate an electrical diagram.

Lamp
=0 =1
Supply
X X
Invertor

Lamp
=1 =0
Supply
X X
Invertor

Logic gates
NOT Gate

Here is how we can represent a NOT GATE using Boolean algebra.

X = X
(where ‘ ’sign represents a ‘NOT’ logic gate)

([INPUT X]) = ([INPUT X]) INVERTED

Logic gates
Summary
This is the notation for AND, OR and NOT gates described below:

AND Logic Gate A.B=X

OR Logic Gate A+B=X

NOT Logic Gate X = X

Logic gates
AND gate NOT gate NAND gate

NAND Gate + =
Supply

Lamp
=0 =0
Switch one Switch two Invertor

The is an electrical diagram that


Input Input Output
represents two switches acting in
0 0 1 series (eg one following another)
followed by a NOT logic gate (invertor)
1 0 1

0 1 1
The NAND gate can also be
1 1 0 represented by a truth table.
Truth table

Logic gates
NAND Gate
Here is how we can represent a NAND GATE using Boolean algebra.

X .Y = Q
(where ‘.’ and ‘ ’sign represents a ‘NAND’ logic gate)

([SWITCH X (open)] . [SWITCH Y (open)])INVERT = [LAMP ON]


([SWITCH X (open)] . [SWITCH Y (closed)])INVERT = [LAMP ON]
([SWITCH X (closed)] . [SWITCH Y (open)])INVERT = [LAMP ON]
([SWITCH X (closed)] . [SWITCH Y (closed)])INVERT = [LAMP OFF]

Logic gates
OR gate NOT gate NOR gate

NOR Gate + =

Here is an electrical Supply =0


diagram representing two Switch is open
switches acting in parallel Lamp
together followed by a
NOT logic gate (invertor)
=0
Invertor
Switch is open

Input Input Output

0 0 1 The switch states can be


represented by a truth table.
1 0 0
This represents the switching
0 1 0 states inside an NOR gate.

1 1 0
Truth table

Logic gates
NOR Gate
Here is how we can represent an NOR GATE using Boolean algebra.

X + Y = Q
(where ‘+’ sign and ‘ ’ represents a ‘NOR’ logic gate)

([SWITCH X (open)] + [SWITCH Y (open)])INVERT = [LAMP ON]


([SWITCH X (open)] + [SWITCH Y (closed)])INVERT = [LAMP OFF]
([SWITCH X (closed)] + [SWITCH Y (open)])INVERT = [LAMP OFF]
([SWITCH X (closed)] + [SWITCH Y (closed)])INVERT = [LAMP OFF]

Logic gates
XOR Gate

Supply Switch one Switch two


Here is an electrical
diagram representing =0
two switches acting in Lamp
a cross over formation.
=1

Input Input Output

0 0 0 The switch states can be


represented by a truth table.
1 0 1
This represents the switching
0 1 1 states inside an XOR gate.

1 1 0
Truth table Switch is open

Logic gates
XOR Gate

Here is how we can represent an XOR GATE using Boolean algebra.

X + Y = Q
(where ‘ ’ sign represents a ‘XOR’ logic gate)

[SWITCH X (open)] + [SWITCH Y (open)] = [LAMP OFF]


[SWITCH X (open)] + [SWITCH Y (closed)] = [LAMP ON]
[SWITCH X (closed)] + [SWITCH Y (open)] = [LAMP ON]
[SWITCH X (closed)] + [SWITCH Y (closed)] = [LAMP OFF]

Logic gates
Summary
This is the notation for AND, OR and NOT gates described below:

AND Logic Gate A.B=X

OR Logic Gate A+B=X

NOT Logic Gate X = X

NAND Logic Gate A.B=X

NOR Logic Gate A+B=X

XOR Logic Gate A B = X

Logic gates
XNOR Gate
XNOR is a digital logic gate whose function is
Here is an electrical the logical complement of the exclusive OR
diagram representing gate (XOR gate). Logically, an XNOR gate is a
two switches acting in NOT gate followed by an XOR gate.
a cross over formation.

Input Input Output

0 0 1 The switch states can be


represented by a truth table.
1 0 0
This represents the switching
0 1 0 states inside an XOR gate.

1 1 1
Truth table Switch is open

Logic gates
Summary
This is the notation for AND, OR and NOT gates described below:

AND Logic Gate

OR Logic Gate
NOT Logic Gate

NAND Logic Gate


NOR Logic Gate
XOR Logic Gate

Logic gates

You might also like