2. At the end of this topic, students
should be able to:
a)
b)
c)
Identify logical operators
Form valid Boolean expressions
Evaluate Boolean expression using
truth
table
Computer System
2.4 Logic Gate & Simple Logic Circuit
2.4.1 Boolean Expression
Chapter
PDT - 2017/2018
5. At the end of this topic, students
should be able to:
a) Identify symbol for logic gate
Computer System
2.4.2 Logic Gate
Chapter
PDT - 2017/2018
6. Logic Gates
•
An electronic circuit operates on one or
more input signals to produce an output
signal.
Gates are digital (two-state, On and Off)
circuits and can be analyzed with Boolean
algebra•
7. The three basic logic gates are :
AND gate OR gate NOT gate
Logic Gates
9. Truth
Table
● A truth table is a good way to show the function of a
logic gate.
● It shows the output states for every possible
combination of input states
● The symbols of 1 (True) or 0 (False) are used
● For a logic gate with n inputs, there are 2n entries in
the truth table
● Eg : A logic gate with 3 inputs will have 8 entries
(2n=8)
10. STEP BY STEP CREATING A BASIC TRUTH TABLE
1. Identify how many input (n) form the given Boolean expression
and logic circuit.
2. Determine number of entry (2n)
3. Creating a table
e.g; Y= A + B 2 input (A, B)
input (n)
2n ; 22 = 4 entries
INPUT
A
INPUT
B
OUTPUT
Y
4 entries
11. A
B
Y = A . B
INPUT
A
INPUT
B
OUTPUT
Y = A. B
0 0 0
0 1 0
1 0 0
1 1 1
Boolean expression : Y = A . B
@ Y = AB
TRUTH TABLE
AND GATE (logic gate, Boolean
expression and Truth Table
12. Electrical Switches – Illustrate switches for AND Gate
SWITCH A SWITCH B LAMP
Open (O) Open (O) OFF (O)
Closed (1) Open (O) OFF (O)
Open (O) Closed (1) OFF (O)
Closed (1) Closed (1) ON (1)
he The AND gate
is an electronic
circuit that gives
a ON(1) output
only if ALL its
inputs are ON(1).
13. A
B
Y = A + B
INPUT
A
INPUT
B
OUTPUT
Y = A+ B
0 0 0
0 1 1
1 0 1
1 1 1
Boolean expression : Y = A + B
TRUTH TABLE
OR GATE (logic gate, Boolean expression
and Truth Table
14. Electrical Switches – Illustrate switches for OR Gate
SWITCH A SWITCH B LAMP
Open (O) Open (O) OFF (O)
Closed (1) Open (O) ON (1)
Open (O) Closed (1) ON (1)
Closed (1) Closed (1) ON (1)
hOR gate is an
electronic circuit
that gives a ON(1)
output if one or
more of its inputs
are ON(1)
15. NOT GATE (logic gate, Boolean
expression and Truth Table
A Y = A
INPUT
A
OUTPUT
Y = A
0 1
1 0
Boolean expression : Y = A
TRUTH TABLE
*Other operator symbol
~A, A’, !A
- The NOT gate has one binary input and one binary output.
- The NOT gate's output is the inverse of its input.
16. A
B
Y = (A . B)
INPUT
A
INPUT
B
OUTPUT
Y = (A.B)
0 0 1
0 1 1
1 0 1
1 1 0
Boolean expression : Y = (A . B)
TRUTH TABLE
NAND GATE (logic gate, Boolean expression
and Truth Table
A
B
17. A
B
Y = (A . B)
INPUT
A
INPUT
B
OUTPUT
Y = (A+B)
0 0 1
0 1 0
1 0 0
1 1 0
Boolean expression : Y = (A + B)
TRUTH TABLE
NOR GATE (logic gate, Boolean expression
and Truth Table
23. Write a boolean expression and draw the truth table to represent this
logic circuit diagram.
Y = (A.B) . C
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
24. Write a boolean expression and draw the truth table to represent this
logic circuit diagram.
Y = (A.B) + C
A B C Y
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
25. At the end of this topic, students
should be able to:
a) Draw simple logic circuit for a given
Boolean expression
Computer System
2.4.3 Logic Circuit
Chapter
PDT - 2017/2018
26. • First, perform all inversions of single terms
• Perform all operations with parentheses ( )
• Perform an AND operation before and OR
operation unless parentheses indicate otherwise
• If an expression has a bar over it, perform the
operations inside the expression first and then
invert the result
Step by step drawing a logic circuit
Precedence
27. Simple Logic Circuit
F = (A + B).C
1. Draw the operations with parentheses ( ) ; (A+B)
2. Joint the output of (A+B) with .C (AND gate)
A
B
C
F
28. Simple Logic Circuit
F = (A . B)+C
1. Draw the operations with parentheses ( ) ; (A.B)
2. Joint the output of (A.B) with .C (OR gate)
A
B
C
F
29. Simple Logic Circuit
F = A + (B.C)
1. First, draw inversions of single terms ; A
2. Draw the operations with parentheses ( ) ; (B.C)
3. Joint the output of A with output of B.C using OR gate
A
B
C
F
32. Draw the logic circuit for the question below
1. F = (B+A).C+(A’+D)
2. Y = (B.C+A).(A’+C)
3. Adi will be the football coach if Emran is the goalkeeper or Irfan is not a
striker. However, Emran will only be a goalkeeper only if ZIkri and Afif are the
defender
4. Amy will reach the International Airport as schedules if she checks in before
9am and her luggage is not more than 20kg
5. PSPM is around the corner. Amni and Anna decided to study at the library.
Elsa and Olaf are interested to join them. Amni will goes to the library if Elsa
or Olaf not goes but Anna goes
Exercise