0% found this document useful (0 votes)
3 views15 pages

Logic Gates and Boolean Algebra

The document discusses logic gates, specifically the NOT gate (inverter), AND gate, OR gate, and their respective truth tables and Boolean equations. It also covers Boolean algebra principles, including laws and rules such as commutative, associative, and distribution laws. The content is presented in a lecture format with examples and applications relevant to digital systems and logic design.

Uploaded by

Deniz Bayram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views15 pages

Logic Gates and Boolean Algebra

The document discusses logic gates, specifically the NOT gate (inverter), AND gate, OR gate, and their respective truth tables and Boolean equations. It also covers Boolean algebra principles, including laws and rules such as commutative, associative, and distribution laws. The content is presented in a lecture format with examples and applications relevant to digital systems and logic design.

Uploaded by

Deniz Bayram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

The NOT gate (inverter)

Indicates inversion
LOGIC GATES AND inverter truth table
BOOLEAN ALGEBRA Input Output
Low (0) High (1)
MANTIK DEVRELERİ
High (1) Low (0)
Yard.Doç.Dr. Mutlu BOZTEPE

Boolean Equation Output = Input


X=A

Indicates inversion

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 1 of 58 Page 2 of 58

Inverter operation
The AND gate

Figure 3--2 Inverter operation with a pulse input.

Inverter application A B Output


example
Low (0) Low (0) Low (0)

Figure 3--3 Timing diagram for


Low (0) High (1) Low (0) Boolean Equation X = AB
the case in Figure 3-2.
High (1) Low (0) Low (0)
High (1) High (1) High (1)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 3 of 58 Page 4 of 58
Example The OR gate

A B Output
Low (0) Low (0) Low (0)
Low (0) High (1) High (1)
Boolean Equation X = A+B
High (1) Low (0) High (1)
High (1) High (1) High (1)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 5 of 58 Page 6 of 58

Example Another example

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 7 of 58 Page 8 of 58
The NAND gate Pulsed operation

A B Output
Low (0) Low (0) High (1)
Low (0) High (1) High (1)
High (1) Low (0) High (1) Boolean Equation X = AB

High (1) High (1) Low (0)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 9 of 58 Page 10 of 58

Equivalent operations Application

AB = A + B (De Morgan rule: discussed later)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 11 of 58 Page 12 of 58
Another application Example

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 13 of 58 Page 14 of 58

The NOR gate Pulsed operation

A B Output
Low (0) Low (0) High (1)
Low (0) High (1) Low (0)
High (1) Low (0) Low (0) Boolean Equation X = A+B

High (1) High (1) Low (0)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 15 of 58 Page 16 of 58
Equivalent operations Application

A+B = A.B (De Morgan rule: discussed later)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 17 of 58 Page 18 of 58

The XOR (exclusive-OR) gate The XNOR (exclusive-NOR) gate

A B Output A B Output
Low (0) Low (0) Low (0) Boolean Equation Low (0) Low (0) High (1)
Low (0) High (1) High (1) Boolean Equation
X = AB+BA = A B Low (0) High (1) Low (0)
High (1) Low (0) High (1) X=A B+BA=A B
High (1) Low (0) Low (0)
High (1) High (1) Low (0) High (1) High (1) High (1)

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 19 of 58 Page 20 of 58
Example Application

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 21 of 58 Page 22 of 58

Boolean Algebra
● 1847’de “Mantığın Matematiksel
BOOLEAN ALGEBRA Çözümlemesi” ve 1854’de “Düşünce Yasaları
Üzerine Bir İnceleme” adlı eserleriyle mantığı
matematikle bağdaştırmayı denemiş
mantıksal yargıya varmayı taklit eden gerçek
bir cebir sunmuştur. George Boole
(1815-1864)
● Bu cebirde bir değişken ya doğru ya da
yanlıştır. (True/False)
● Bu cebir günümüzde dijital sistemlerin yani
gelişmiş bilgisayarların ve yazılımlarının
temelini oluşturmaktadır.

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 23 of 58 Page 24 of 58
Özgürlüğe açılan kapı Boolean Algebra Laws and Rules
● Bir adam hapistedir. Bulunduğu hücrede iki kapı ve her iki
kapıda birer gardiyan bulunmaktadır. Kapılardan biri ● Boolean Addition
özgürlüğe açılırken, diğeri gerçek değildir. Gardiyanlardan biri
daima doğru, diğeri ise her zaman yalan söylemektedir. X=A + B (logical OR function)
Mahkumun özgürlüğe açılan gerçek kapıyı öğrenebilmesi için
gardiyanlardan birisine, tek soru sorma hakkı vardır. Mahkum
hangi gardiyana ve ne sormalıdır ki örgürlüğe açılan kapıyı
bulsun
Doğru kapı K ile gösterilsin. Gardiyan yalan söylerse bunu değil olarak
belirtelim.
● Boolean Multiplication
Gardiyanlardan birisine “Diğer gardiyana sorsaydım gerçek kapı olarak
hangisini gösterirdi?” diye sorulursa; X = AB (logical AND function)
sonuç= K’K=KK’ olur.
Sonuç her zaman 0 dir. Yani gardiyanın gösterdiği kapı her durumda yanlış
olacaktır. Diğer kapı seçilmelidir!

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 25 of 58 Page 26 of 58

Boolean Algebra Laws and Rules Boolean Algebra Laws and Rules
● Toplamanın Değişme Özelliği (Commutative ● Çarpmanın Değişme Özelliği (Commutative
Law of Addition) Law of Multiplication)
A+B = B+A AB = BA

X= X=
Y Y

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 27 of 58 Page 28 of 58
Boolean Algebra Laws and Rules Boolean Algebra Laws and Rules
● Toplamanın Birleşme Özelliği (Associative ● Çarpmanın Birleşme Özelliği (Associative
Law of Addition) Law of Multiplication)
A+(B+C) = (A+B)+C A(BC) = (AB)C

X= X=
Y Y

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 29 of 58 Page 30 of 58

Boolean Algebra Laws and Rules Distribution Law


(A+B)(C+D) = AC + AD + BC + BD
● Dağılma özelliği (Distrubition Law)
A(B+C) = AB+AC

X= X=
Y Y

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 31 of 58 Page 32 of 58
A+0=A A+1=1
In math if you add 0 you have changed nothing in ORing with 1 must give a 1 since if any input
Boolean Algebra ORing with 0 changes nothing is 1 an OR gate will give a 1

A A

X=1
X
X X=A

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 33 of 58 Page 34 of 58

A•0=0 A•1 =A

In math if 0 is multiplied with anything you ANDing anything with 1 will yield the anything
get 0. If you AND anything with 0 you get 0

A X=0 A

X=A
X X

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 35 of 58 Page 36 of 58
A+A = A A+A=1

ORing with itself will give the same result Either A or A must be 1 so A + A =1

A A
A A=A A

X=1
X X

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 37 of 58 Page 38 of 58

A•A = A A•A =0

ANDing with itself will give the same result In digital Logic 1 =0 and 0 =1, so AA=0 since
one of the inputs must be 0.

A
A
A A=A
A
X=0
X
X

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 39 of 58 Page 40 of 58
A=A A + AB = A
If you not something twice you are back to the beginning

A
A
B
X
X X=A

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 41 of 58 Page 42 of 58

A + AB = A + B (A + B)(A + C) = A + BC
If A is 1 the output is 1 If A is 0 the output is B

A B
B C

X
X=Y X
Y
Y

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 43 of 58 Page 44 of 58
De MORGAN
De MORGAN
De Morgan will help to simplify digital circuits
using NORs and ANDs his theorem states

A•B=A+B
This should show That both circuits have the same output
A+B=A•B

if more than 2 variables are used follow the


same pattern
De Morgan was right they are the same

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 45 of 58 Page 46 of 58

De MORGAN
Look at A +B +C + D = A • B • C • D

Laws and rules


in Boolean
Algebra

This is the same too

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 47 of 58 Page 48 of 58
Bir lojik devrenin bool fonksiyonunun
elde edilmesi (Boolean Analysis)
Example 2

Example 1

X= AB+(C+D) X = (AB)(CD)
X= AB + C+ D X = ABCD

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 49 of 58 Page 50 of 58

Example 4
Example 3

X = (AB+B’)BC
using distributive law
X = ABBC +B’BC
X = ABC + B’BC
X = ABC + 0•C
X = ABCD +A’ X = ABC + O
X = A’ + BCD X = ABC

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 51 of 58 Page 52 of 58
Örnek-1
Basitleştirme (Simplification)
● Verilen bir boolean fonksiyonu daha basit
hale indirgeme işlemine denir.
● Bool cebri kuralları uygulanarak fonksiyon
basitleştirilir.
● Böylece fonksiyon gerçekleştirilirken daha az
lojik kapı kullanılır.

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 53 of 58 Page 54 of 58

Örnek -1 Örnek -2
(A + B)(CD) = A + B + CD
= A + B + CD

X and Y are
the same

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 55 of 58 Page 56 of 58
Örnek -2 Örnek -2

X = A + B C + CD + B
= A + B C CD + B
= A + B C (CD + B)
= A B C (C +D +B)
= A B C C + A B C D +A B B C
=ABCD

The
Now to check our work
circuits are
the same

https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24 https://egeders.ege.edu.tr/pluginfile.php/2055129/mod_resource/content/1/Lecture3_logic%20gates%20and%20boolean%20algebra.ppt 5.04.2025, 23:24


Page 57 of 58 Page 58 of 58

You might also like