0% found this document useful (0 votes)
26 views

Logic Gate

Uploaded by

Hana Jeon
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)
26 views

Logic Gate

Uploaded by

Hana Jeon
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/ 36

Logic gates and logic circuits

Chapter 10
Logic Gate
• What is Logic gate

• Takes input and produces output by performing operations on the input.

• The input and output are in the form of binary digits (0 or 1) .

AND Gate
Input Output / result
A= 0/ 1 A
X X= 0/ 1
B= 0/ 1 B

X= A AND B
Logic Gate
• Difference type of Logic gate
NOT Gate AND Gate

OR Gate NAND Gate

NOR Gate XOR Gate


Logic Gate
What is Logic Circuit

• Several logic gates combined together form logic circuit that are designed to perform
a specific function.

• The logic gate and logic circuit used truth table to check outputs.
Truth Table
• Truth tables are used to trace the output from a logic gate or logic circuit.

• When constructing truth tables, all possible combinations of 1s and Os which can be
input are considered.
A B
0 0
0 A 1 1
A X X
0 B
A X A B X(output)
0 0 ?
0 ?
0 1 ?
? 1 0 ?
1
1 1 ?
Truth Table
• For logic circuits, the number of inputs can be more than 2. A B C X
• For example :
• The number of the input = 3 0 0 0
• Possible combination= 2 no of input = 23 = 8
0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
Truth Table
• For the no. of input =4
• Possible combination=24 = 16
Function of Logic gate
NOT Gate
Truth Table
A X A X

0 1

logic notation
1 0
X = NOT A

Function: The output, X, is the inverse of input A


Function of Logic gate
AND Gate
A Truth Table
X A B X(output)
B
0 0 0
logic notation
X = A AND B 0 1 0

1 0 0

1 1 1

Function: The output, X, is 1 if: input A and input B are both 1.


Function of Logic gate
OR Gate
A Truth Table
X A B X
B
0 0 0
logic notation
0 1 1
X = A OR B
1 0 1
1 1 1

Function: The output, X, is 1 if: input A or B is 1.


Function of Logic gate
NAND Gate
A Truth Table
X A B X
B
0 0 1
logic notation 0 1 1
X = A NAND B 1 0 1
1 1 0

Function: The output, X, is 1 if: input A AND input B are NOT both 1.
Function of Logic gate
NOR Gate
A Truth Table
X A B X
B
0 0 1
logic notation
0 1 0
X = A NOR B 1 0 0
1 1 0

Function: The output, X, is 1 if: neither input A nor B are 1.


Function of Logic gate
XOR Gate
A Truth Table
X
A B X
B
0 0 0
0 1 1
logic notation
X = A XOR B
1 0 1
1 1 0

Function: The output, X, is 1 if (A is 1 AND B is O) OR (A is O AND B is 1)


Logic Circuit
• When logic gates are connected they form a circuit.
• Logic circuits are designed to perform a particular function such as controlling robot.
• Logic circuits can be expressed as a circuit diagram, or as a written logic statement.
• The output from the logic circuit is checked using a truth table.
 how to produce a truth table
 how to design a logic circuit from a given logic statement/Boolean algebra
 how to design a logic circuit to carry out an actual safety function.
How to produce a truth table for Logic Circuit

Input Working Output


P space

A B C P Q X
A AND B NOT C P OR Q

0 0 0 0 1 1
Q 0 0 1 0 0 0
0 1 0 0 1 1
1. On the circuit diagram, add temporary letters of each gate’ output (P,Q) 0 1 1 0 0 0
2. Create a blank truth table, allowing space for all the temporary 1 0 0 0 1 1
letters
1 0 1 0 0 0
3. Write into the truth table all the possible unique input
combinations 1 1 0 1 1 1
4. In the truth table, calculate the output at each temporary letter 1 1 1 1 0 1
(each logic gate)
5. able to find the final output for the logic circuit after calculation of
each gate result ( temporary letters)
How to produce a truth table for Logic Circuit

Input Working space Output


A B C P Q R X
A A AND B B NOR C P OR Q C XOR R
P
B 0 0 0 0 1 1 1
R 0 0 1 1
0 0 0
X 0 1 0 0 0 0 0
C Q 0 1 1 0 0 0 1
1 0 0 0 1 1 1
1 0 1 0 0 0 1
1 1 0 1 0 1 1
1 1 1 1 0 1 0
How to produce a truth table for Logic Circuit

P
R

Pg no . 364
X Act 10.2 ( No 1 (a-e)
Q

Input Working Space Output


A B P Q R X
NOT A A OR B P AND Q Q OR R

0 0 1 0 0 0
0 1 1 1 1 1
1 0 0 1 0 1
1 1 0 1 0 1
Activity 3.2

Produce truth tables for each of the following logic circuits. You are
advised to split them up into intermediate parts to help eliminate
errors.
Input Working Space Output
P A B P Q R X
(A AND (A NOT (P OR
B) OR Q Q)
B)
0 0

R 0 1
Q
1 0
1 1
For the given circuit, draw the truth table.

a. b.
How to design a logic circuit from a given logic
statement/Boolean algebra
Example:1

X=1 if (A AND B) OR ( B NAND C)

X= (A AND B) OR ( B NAND C)

Example:2

X=1 if ((NOT A) AND (A OR B)) OR (A OR B)

X=((NOT A) AND (A OR B)) OR (A NOR B)

Example:3
X= (NOT (A NAND B)) OR (B NOR C)
1. X= ( (A NAND B) XOR ( NOT B OR C)) OR (B NOR C)
2. X = ((((NOT A AND B) OR C) AND B) NOR (B OR C))
3. X = (A OR B) OR (NOT A AND B)
4. Y = (NOT A AND NOT B) AND (NOT B OR C)

• For given logic statement , draw logic circuit and truth table
How to design a logic circuit from a given logic statement

X=1 if (A =OFF OR B=ON) AND ( A=ON NOR B=OFF)


NOTE
ON=1
OFF=0
0= NOT 1

X= (A =NOT 1 OR B=1) AND ( A=1 NOR B=NOT 1) NOTE


A=1 A
A =NOT 1 NOT A
X= (NOT A OR B ) AND ( A NOR NOT B)
1. T= 1 if ( K is ON OR L is ON) OR ( K is ON AND M = OFF) OR (M is ON)
Draw logic circuit and truth table for given logic expression
Draw a logic circuits and complete the truth table for the following logic or Boolean expressions:
1. X = ((((NOT A AND B) OR C) AND B) NOR (B OR C))
2. X = (A OR B) OR (NOT A AND B)
3. Y = (NOT A AND NOT B) AND (NOT B OR C)
How to create logic statement from logic
circuit
X = R OR Q
P X = (P AND Q) OR Q
R
X = ((NOTA) AND Q) OR Q

X X = ((NOTA) AND (A OR B)) OR Q


Q
X = ((NOTA) AND (A OR B)) OR (A OR B)
How to create logic statement from logic
circuit
A X = R XOR C
P
B
X = (P OR Q) XOR C
R
X X = ((A AND B) OR Q) XOR C
C Q
X = ((A AND B) OR (B NOR C)) XOR C
Exercise
(b)
Exercise
How to create from logic statement/Boolean
algebra from Truth table
Input Output
A B X To produce the logic statement, we only concern
ourselves with the truth table row where the output
0 0 0 value is 1.
In this case
0 1 0
A= 1 and B = 0 which gives logic statement
1 0 1 A AND NOT B
1 1 0

X = A AND NOT B
How to create from logic statement/Boolean
algebra from Truth table
Which Boolean expression is represented by the following truth table?
Input Output
A B C X
0 0 0 1 A= 0 and B =0 and C = 0 = NOT A AND NOT B AND NOT C
Pg 370 0 0 1 0
(3,4,5(a)) 0 1 0 0
0 1 1 0
1 0 0 1 A= 1 and B =0 and C = 0 = A AND NOT B AND NOT C
1 0 1 0
1 1 0 1 A= 1 and B =1 and C = 0 = A AND B AND NOT C
1 1 1 0
X = (NOT A AND NOT B AND NOT C ) OR (A AND
NOTE .Join each expression using OR to NOT B AND NOT C) OR ( A AND B AND NOT C)
create final expression
C.
How to design a logic expression, circuit and truth
table from a given problem
A safety system uses three inputs to a logic circuit. An alarm, X, sounds
if input A represents ON and input B represents OFF;
or
if input B represents ON and input C represents OFF.
Produce a logic circuit and truth table to show the conditions which cause the output X to be 1. (Note
ON=1 and OFF=0)

X = 1 if ( A=ON AND B=OFF) OR (B= ON and C=OFF)

X = ( A=1 AND B=0) OR (B= 1 and C=0)

X = ( A AND NOT B) OR (B AND NOT C)


Input Working space Outpu
X = ( A AND NOT B) OR (B and NOT C) t
A B C P Q R S X
NOT B NOT C A AND P B AND Q R OR S
A
P R
B 0 0 0 1 1 0 0 0
X
0 0 1 1 0 0 0 0
S 0 1 0 0 1 0 1 1
C Q 0 1 1 0 0 0 0 0
1 0 0 1 1 1 0 1
1 0 1 1 0 1 0 1
1 1 0 0 1 0 1 1
1 1 1 0 0 0 0 0

Truth Table
THANK YOU…….

You might also like