03gerbang logika & aljabar boolean...gerbang logika dan aljabar boolean program studi t. elektro...
TRANSCRIPT
Gerbang Logika dan
Aljabar Boolean
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 1
ENDY SAENDY SAProgram Studi Teknik Elektro
Fakultas Teknik
Universitas Muhammadiyah Prof. Dr. HAMKA
Gerbang Logika dan Aljabar
Boolean
� Sekarang kita telah mengetahui konsep
bilangan biner, dan kita akan mempelajari
cara menggambarkan bagaimana sistem
menggunakan menggunakan level logika
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 2
menggunakan menggunakan level logika
biner dalam membuat keputusan.
� Aljabar Boolean adalah alat yang penting
dalam menggambarkan, menganalisa,
merancang, dan mengimplementasikan
rangkaian digital.
Konstanta Boolean dan
Variabel.
� Aljabar Boolean dibawah ini hanya mempunyai dua nilai : 0 dan 1.
� Logika 0 dapat dikatakan : false, off, low, no, saklar terbuka.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 3
saklar terbuka.
� Logika 1 dapat dikatakan: true, on, high, yes, saklar tertutup.
� Tiga operasi logika dasar: OR, AND, dan NOT.
Tabel Kebenaran
� Sebuah tabel kebenaran menggambarkan
hubungan antara input dan ouput sebuah
rangkaian logika.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 4
� Jumlah The number of entries corresponds to
the number of inputs. For example a 2 input
table would have 22 = 4 entries. A 3 input
table would have 23 = 8 entries.
Tabel Kebenaran
� Contoh tabel kebenaran dengan masukan 2, 3 dan
4 buah.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 5
Operasi OR dengan gerbang OR
� The Boolean expression for the OR operation is
X = A + B
� This is read as “x equals A or B.”
� X = 1 when A = 1 or B = 1.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 6
� Truth table and circuit symbol for a two input OR
gate:
OR Operation With OR Gates
� The OR operation is similar to addition but
when A = 1 and B = 1, the OR operation
produces 1 + 1 = 1.
� In the Boolean expression
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 7
� In the Boolean expressionx=1+1+1=1
We could say in English that x is true (1) when A is true
(1) OR B is true (1) OR C is true (1).
OR Operation With OR Gates
� There are many examples of applications
where an output function is desired when
one of multiple inputs is activated.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 8
AND Operations with AND gates
� The Boolean expression for the AND operation is
X = A • B
� This is read as “x equals A and B.”
� x = 1 when A = 1 and B = 1.
� Truth table and circuit symbol for a two input AND gate are
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 9
� Truth table and circuit symbol for a two input AND gate are
shown. Notice the difference between OR and AND gates.
Operation With AND Gates
� The AND operation is similar to multiplication.
� In the Boolean expressionX = A • B • C
X = 1 only when A = 1, B = 1, and C = 1.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 10
X = 1 only when A = 1, B = 1, and C = 1.
NOT Operation
� The Boolean expression for the NOT operation is
AX =
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 11
� This is read as:
� x equals NOT A, or
� x equals the inverse of A, or
� x equals the complement of A
AX =
NOT Operation
� Truth table, symbol, and sample waveform
for the NOT circuit.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 12
Describing Logic Circuits
Algebraically
� The three basic Boolean operations (OR,
AND, NOT) can describe any logic circuit.
� If an expression contains both AND and OR
gates the AND operation will be performed
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 13
gates the AND operation will be performed
first, unless there is a parenthesis in the
expression.
Describing Logic Circuits
Algebraically
� Examples of Boolean expressions for logic
circuits:
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 14
Describing Logic Circuits
Algebraically
� The output of an inverter is equivalent to the
input with a bar over it. Input A through an
inverter equals A.
� Examples using inverters.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 15
� Examples using inverters.
Evaluating Logic Circuit Outputs
� Rules for evaluating a Boolean expression:
� Perform all inversions of single terms.
� Perform all operations within parenthesis.
� Perform AND operation before an OR operation
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 16
� Perform AND operation before an OR operation
unless parenthesis indicate otherwise.
� If an expression has a bar over it, perform the
operations inside the expression and then invert
the result.
Evaluating Logic Circuit Outputs
� Evaluate Boolean expressions by substituting
values and performing the indicated
operations:
1D and 1,C 1,B 0,A ====
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 17
0
0111
)1(111
1)(0111
1)(0110
D)(ABCAx
1D and 1,C 1,B 0,A
=
⋅⋅⋅=
⋅⋅⋅=
+⋅⋅⋅=
+⋅⋅⋅=
+=
====
Evaluating Logic Circuit Outputs
� Output logic levels can be determined directly
from a circuit diagram.
The output of each gate is noted until a final
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 18
� The output of each gate is noted until a final
output is found.
Implementing Circuits From
Boolean Expressions
� It is important to be able to draw a logic circuit from a Boolean expression.
� The expression
CBAx ⋅⋅=
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 19
could be drawn as a three input AND gate.
� A more complex example such as
could be drawn as two 2-input AND gates and one 3-input AND gate feeding into a 3-input OR gate. Two of the AND gates have inverted inputs.
BCACBACy ++=
NOR Gates and NAND Gates
� Combine basic AND, OR, and NOT
operations.
� The NOR gate is an inverted OR gate. An
inversion “bubble” is placed at the output
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 20
inversion “bubble” is placed at the output
of the OR gate.
� The Boolean expression is,BAx +=
NOR Gates and NAND Gates
� The NAND gate is an inverted AND gate.
An inversion “bubble” is placed at the
output of the AND gate.
The Boolean expression is
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 21
� The Boolean expression is
ABx =
NOR Gates and NAND Gates
� The output of NAND and NOR gates may be
found by simply determining the output of an
AND or OR gate and inverting it.
� The truth tables for NOR and NAND gates
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 22
� The truth tables for NOR and NAND gates
show the complement of truth tables for OR
and AND gates.
Universality of NAND and NOR Gates
� NAND or NOR gates can be used to create the three basic logic expressions (OR, AND, and INVERT)
� This characteristic provides flexibility and is
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 23
� This characteristic provides flexibility and is very useful in logic circuit design.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 24
Combinations of NANDs are used to create the three logic functions.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 25
combinations of NORs are used to create the three logic functions.
The Exclusive OR BAX ⊕=
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 26
The Exclusive NOR BAABX +=
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 27
IEEE/ANSI Standard Logic
Symbols
� Compare the
IEEE/ANSI symbols
to traditional symbols.
� These symbols are
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 28
� These symbols are
not widely accepted
but may appear in
some schematics.
Application
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 29
Application
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 30
Exercise
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 31
Output
Boolean expressions ???
Truth Table???
Exercise
V2
0V
V1
0V L1
U6A
U5A
U4A
U1A
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 32
V4
0V
V3
0V
U6B
U4B L2
U3A
U2A
Boolean expressions ???
Truth Table???
Summary of Methods to Describe Logic Circuits
� The three basic logic functions are AND, OR,
and NOT.
� Logic functions allow us to represent a
decision process.
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 33
decision process.
� If it is raining OR it looks like rain I will take an
umbrella.
� If I get paid AND I go to the bank I will have
money to spend.
Thank You
Program Studi T. Elektro
FT - UHAMKA
Slide - 3 34