You are on page 1of 54

ELS2103 Digital Systems

Introduction to Logic Circuits


Semester 1 2018/2019 9/17/2018 GFP 1
Outlines
 Variables
 Functions
 Inversion and Truth Tables.
 Syhenthesis using AND, OR, and NOT gates
 Logic Gates
 Boolean Algebra

9/17/2018 GFP 2
Logika Biner dan Gerbang Logika (Gates)

 Variabel Biner : satu dari dua nilai (0 dan 1)


 Operator Logika : beroperasi pada bilangan biner
dan variable biner.
 Operator Logika dasar adalah: fungsi logika AND,
OR dan NOT.
 Gerbang Logika : implementasi dari fungsi logika.
 Boolean Algebra: suatu teori matematika yang
sangat berguna untuk menspesifikasi dan
mentransformasi suatu fungsi logika.
 Mengapa belajar Boolean Algebra? ; karena
merupakan fondasi dasar untuk mendesain dan
menganalisa system digital!
Variabel Biner
 Ingat bahwa dua nilai biner pasti memiliki
dua hal berbeda
◦ True/False
◦ On/Off
◦ Yes/No
◦ 1/0
 Kita menggunakan 1 and 0 untuk
menunjukkan dua bilangan.
 Contoh variable Identitas:
◦ A, B, y, z, atau X1
Operasi Logika
 Tiga operasi Logika dasar adalah:
◦ AND
◦ OR
◦ NOT
 AND disimbolkan dengan dot (·).
 OR disimbolkan dengan plus (+).
 NOT disimbolkan dengan overbar (¯),
suatu tanda petik ('), atau (~) sebelum
suatu variable.
Notasi (Contoh)
 Contoh
◦ Y = A  B dibaca “Y sama dengan A AND B.”
◦ z = x + y dibaca “z sama dengan x OR y.”
◦ X=A dibaca “X sama dengan NOT A.”

 Note:
1 + 1 = 2 (dibaca “one plus one equals two”)
tidak sama dengan
1 + 1 = 1 (dibaca “1 OR 1 sama dengan 1”).
Definisi Operator
 Operasi didefinisikan pada nilai “0” dan
“1” untuk setiap operator:

AND OR NOT
0·0=0 0+0=0 0= 1
0·1=0 0+1=1 1= 0

1·0=0 1+0=1
1·1=1 1+1=1
Truth Tables
 Truth table : tabel berisi nilai input dan output
dari suatu fungsi untuk semua kombinasi yang
mungkin ada.
 Contoh : Truth tables pada operasi logika dasar
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z=X
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
Implementasi Fungsi logika
 Using Switches Switches in parallel => OR
◦ For inputs:
 logic 1 is switch closed
 logic 0 is switch open
◦ For outputs:
 logic 1 is light on Switches in series => AND
 logic 0 is light off.
◦ NOT uses a switch
such
that: Normally-closed switch => NOT
 logic 1 is switch open C
 logic 0 is switch closed
Implementasi Fungsi logika (lanjutan)

 Contoh: Logic Using Switches


B C
A L

D
 Lampu menyala (L = 1) untuk
L(A, B, C, D) =
dan sebaliknya lampu off (L = 0).
Gerbang Logika (Logic Gates)

Today, transistors are used as electronic


switches that open and close current paths.

Later, vacuum tubes that open


and close current paths
electronically replaced relays.

In the Earliest computers, switches were opened and


closed by magnetic fields produced by energizing coils
in relays.
Simbol Gerbang Logika dan
Fungsinya
 Gerbang Logika memiliki simbol khusus:
X X
Z 5 X ·Y Z5 X1 Y X Z5 X
Y Y
X X
AND gate Z 5 X ·Y OR gate Z 5 X 1 Y X NOT gateZor
5 X
Y Y inverter
AND gate OR
(a) Graphic gate
symbols NOT gate or
inverter

• Dan fungsinya ditunjukkan dalam tabel berikut:


(a) Graphic symbols
X 0 0 1 1
X 0 0 1 1

Y 0 1 0 1
Y 0 1 0 1

(AND) X ·Y
(AND) X · Y
0 0 00 00 1
1

(OR)(OR)X 1XY1 Y 0 0 11 11 11

(NOT) X 1 1 0 0
(NOT) X 1 1 0 0
(b) Timing diagram
Gate Delay
1
Input
0
tG tG tG = 0.3
1 ns
Output
0
0 0.5 1 1.5 Time (ns)

Ekspresi dan Diagram Logika
Truth Table Persamaan
XYZ F = X + Y  Z
000 0 F = X +Y Z
001 1
010 0 Diagram Logika
011 0 X
100 1
Y F
101 1
110 1 Z
111 1

 Persamaan Boolean,Tabel kebenaran dan diagram


logika menjelaskan fungsi yang sama.
Logic functions and circuits

Another expression
Truth Table
Three-input AND and OR operations.
Truth Table

Can You Draw the Circuit?


LOGIC CIRCUIT DESIGN
x y z F
0 0 0 0
Truth 0 0 1 1
Table 0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Boolean
Function F = x + y’z

x
Logic F
y
Diagram
z
COMBINATIONAL GATES
Name Symbol Function Truth Table
A B X
A X=A•B 0 0 0
AND X or 0 1 0
1 0 0
B X = AB 1 1 1
A B X
A 0 0 0
OR X X=A+B 0 1 1
1 0 1
B 1 1 1
A X
I 0 1
A X X = A’ 1 0
A X
0 0
Buffer A X X=A 1 1
A B X
A 0 0 1
NAND 0 1 1
X X = (AB)’ 1 0 1
B 1 1 0
A B X
A 0 0 1
NOR X X = (A + B)’ 0
1
1
0
0
0
B 1 1 0
A B X
A X=AB
XOR X or
0
0
0
1
0
1
Exclusive OR 1 0 1
B X = A’B + AB’
1 1 0
A B X
A X = (A  B)’
XNOR X or
0
0
0
1
1
0
Exclusive NOR
B X = A’B’+ AB 1 0 0
or Equivalence 1 1 1
Boolean Algebra
In 1849 George Boole published
a scheme for the algebraic
description of processes
involved in logical thought and
reasoning and became known
as Boolean algebra.

In the late 1930s Claude


Shannon showed that Boolean
algebra provides an effective
means of describing circuits
built with switches
Axioms of Boolean Algebra
Like any algebra, Boolean algebra is based on a set of
rules that are derived from a small number of basic
assumptions. These assumptions are called axioms.
Truth Table

Step:
1. which the output function f has to be 1.

2. Draw the logic network using Gates.

• Is there any possibilities


to make this Network
more simple?
• If any, How?
To find the simplest one of Logic Circuit, we use
Boolean Algebra
Truth Table
Boolean Operator Precedence
(urutan pengerjaan)
 The order of evaluation in a Boolean
expression is:
1. Parentheses
2. NOT
3. AND
4. OR
 Consequence: Parentheses appear
around OR expressions
 Example: F = A(B + C)(C + D)
Example 1: Boolean Algebraic Proof
 A + A·B = A (Absorption Theorem)
Proof Steps Justification (identity or theorem)
A + A·B
= A · 1 +A · B X=X·1
= A · ( 1 + B) X · Y + X · Z = X ·(Y + Z)(Distributive Law)
=A · 1 1+X=1
=A X·1=X

 Our primary reason for doing proofs is to learn:


◦ Careful and efficient use of the identities and theorems
of Boolean algebra, and
◦ How to choose the appropriate identity or theorem to
apply to make forward progress, irrespective of the
application.
Useful Theorems
x  y + x  y = y (x + y)(x + y)= y Minimization
 x+x.y=x x.(x+y) = x (Absorption)
x + x y = x + y x  (x+ y)= x  y Simplification
x  y + x z + y  z = x  y + x  z Consensus
(x + y) (x + z) (y + z) = (x + y) (x + z)
 x + y = x y x y = x + y DeMorgan‘s Laws
Boolean Function Evaluation
F1 = xyz x y z F1 F2 F3 F4
F2 = x + yz 0 0 0 0 0
F3 = xyz + x y z + xy 0 0 1 0 1
F4 = xy + x z 0 1 0 0 0
0 1 1 0 0
1 0 0 0 1
1 0 1 0 1
1 1 0 1 1
1 1 1 0 1

F3 is 1 for x’y’z’, x’yz, xy’z’ and xy’z => F3 = 1,0,0,1,1,1,0,0


F4 is 1 for xy’z’, xy’z, x’y’z and x’y z => F4 = 0,1,0,1,1,1,0,0
Overview – Canonical Forms
 What are Canonical Forms?
 Minterms and Maxterms
 Index Representation of Minterms and
Maxterms
 Sum-of-Minterm (SOM) Representations
 Product-of-Maxterm (POM)
Representations
 Representation of Complements of
Functions
 Conversions between Representations
Canonical Forms
 It is useful to specify Boolean
functions in a form that:
◦ Allows comparison for equality.
◦ Has a correspondence to the truth tables
 Canonical Forms in common usage:
◦ Sum of Minterms (SOM)
◦ Product of Maxterms (POM)
Minterms
 Minterms are AND terms with every variable
present in either true or complemented form.
 Given that each binary variable may appear
normal (e.g., x) or complemented (e.g.,
x ), there
are 2n minterms for n variables.
 Example:Two variables (X and Y)produce
2 x 2 = 4 combinations:
XY (both normal)
X Y (X normal,Y complemented)
XY (X complemented,Y normal)
X Y (both complemented)
 Thus there are four minterms of two variables.
Maxterms
 Maxterms are OR terms with every variable
in true or complemented form.
 Given that each binary variable may appear
normal (e.g., x) or complemented (e.g., x),
there are 2n maxterms for n variables.
 Example:Two variables (X and Y) produce
2 x 2 = 4 combinations:
X + Y (both normal)
X + Y (x normal, y complemented)
X + Y (x complemented, y normal)
+ (both complemented)
X Y
For a function of n variables, a product term in which
each of the n variables appears once is called a
minterm
Index Examples – Four Variables
Index Binary Minterm Maxterm
i Pattern mi Mi
0 0000 ab c d a + b + c + d
1 0001 ab c d ?
3 0011 ? a+ b + c + d
5 0101 ab c d a + b + c + d
7 0111 ? a+ b + c + d
10 1010 ab c d a + b + c + d
13 1101 ab c d ?
15 1111 a b c d a + b + c + d
Minterm Function Example
 Example: Find F1 = m1 + m4 + m7
 F1 = x y z + x y z +x y z
x y z index m1 + m4 + m7 = F1
000 0 0 + 0 + 0 =0
001 1 1 + 0 + 0 =1
010 2 0 + 0 + 0 =0
011 3 0 + 0 + 0 =0
100 4 0 + 1 + 0 =1
101 5 0 + 0 + 0 =0
110 6 0 + 0 + 0 =0
111 7 0 + 0 + 1 =1
Minterm Function Example
 F(A, B, C, D, E) = m2 + m9 + m17 + m23
 F(A, B, C, D, E) =

Chapter 2 - Part 1 36
Maxterm Function Example
 Example: Implement F1 in maxterms:
F1 = M0 · M2 · M3 · M5 · M6
F1 = (x+ y + z)·(x+ y + z)·(x+ y + z)
·(x + y + z)·(x + y + z)
xyz i M0  M2  M3  M5  M6 = F1
000 0 0  1  1 1  1 =0
001 1 1  1  1 1  1 =1
010 2 1  0  1 1  1 =0
011 3 1  1  0 1  1 =0
100 4 1  1  1 1  1 =1
101 5 1  1  1 0  1 =0
110 6 1  1  1 1  0 =0
111 7 1  1  1 1  1 =1
Maxterm Function Example
 F (A , B, C , D) =M 3 M 8 M11 M14
 F(A, B,C,D) =
SUM of Product (SOP) and
Product of SUM (POS)
Standard Forms
 Standard Sum-of-Products (SOP) form: equations
are written as an OR of AND terms
 Standard Product-of-Sums (POS) form: equations
are written as an AND of OR terms
 Examples:
◦ SOP:
A BC + A BC + B
◦ POS:
(A+ B)· (A+ B + C )·C
 These “mixed” forms are neither SOP nor POS

◦ (A B + C) (A + C)
A B C + A C (A+ B)
SUM of Product (SOP) : Minterm
Example 1

The function in truth table can


Truth Table be represented as

0 0 1
0 1 1
1 0 0
1 1 1
SUM of Product (SOP)
Example 2

Simplification using Boolean Algebra

the function in truth table can be specified as

or even more simply as


Summary
SUM of Product (SOP)

Logic Circuit?
Product of SUM (POS) : Maxterm
Truth Table

0 0 1
0 1 1
1 0 0 If we complement this expression
1 1 1 using DeMorgan’s theorem, the
result is

The key point here is that


Example
Then f can be expressed as

Using the commutative property 10b and the associative property 11b

Then, using the combining property 14b, the expression reduces to


Using the shorthand notation, an alternative way of
specifying our sample function is

or more simply
Back to Problem last week

From the truth table, can you


make the:
1. The canonical sum-of-products
(SOP) expression for the
specified function?
2. The Logic Network?
Lam
p
0 0 0 0 From the truth table, can you
0 0 1 1 make the:
0 1 0 1 1. The canonical products-of-sum
0 1 1 0 (POS) expression for the
1 0 0 1 specified function?
1 0 1 0 2. The Logic Network?
1 1 0 0
1 1 1 1
Answer

The canonical sum-of-products expression for the specified


function is
Answer

Realization for this function is in


the product-of-sums form.
EOF

9/17/2018 GFP 54

You might also like