Top Banner
Digital Logic Design “Combinational Logics” Dr. Cahit Karakuş, February-2018
97

Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Jan 06, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Digital Logic Design “Combinational Logics”

Dr. Cahit Karakuş, February-2018

Page 2: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Basics

Page 3: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Digital Logic Basics

• Hardware consists of a few simple building blocks – These are called logic gates

• AND, OR, NOT, …

• NAND, NOR, XOR, …

• Logic gates are built using transistors • NOT gate can be implemented by a single transistor

• AND gate requires 3 transistors

• Transistors are the fundamental devices • Pentium consists of 3 million transistors

• Compaq Alpha consists of 9 million transistors

• Now we can build chips with more than 100 million transistors

Page 4: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Temel Kavramlar -1

• Number of functions

– With N logical variables, we can define

22N functions

– Some of them are useful • AND, NAND, NOR, XOR, …

– Some are not useful: • Output is always 1

• Output is always 0

– “Number of functions” definition is useful in proving completeness property

Page 5: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Temel Lojik Kapılar -1

• Simple gates

– AND

– OR

– NOT

• Functionality can be expressed by a

truth table

– A truth table lists output for each

possible input combination

• Precedence

– NOT > AND > OR

– F = A B + A B

= (A (B)) + ((A) B)

Page 6: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Temel Lojik Kapılar -2

• Additional useful gates

– NAND

– NOR

– XOR

• NAND = AND + NOT

• NOR = OR + NOT

• XOR implements exclusive-OR function

• NAND and NOR gates require only 2 transistors

– AND and OR need 3 transistors!

Page 7: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Temel Kavramlar -3

• Proving NAND gate is universal

• Proving NOR gate is universal

Page 8: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Logic Functions

Page 9: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Logic Functions

• Logical functions can be expressed in several ways:

– Truth table

– Logical expressions

– Graphical form

• Example:

– Majority function

• Output is one whenever majority of inputs is 1

• We use 3-input majority function

Page 10: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Logic Functions 3-input majority function A B C F

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

• Logical expression form

F = A B + B C + A C

Page 11: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Logical Equivalence

• All three circuits implement F = A B function

Page 12: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Boolean Algebra

Page 13: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Boole Cebri Aksiyomları

• Her bir değişken “0” veya “1” değerinden sadece birini alabilir.

• 1+1=1, Birbirine VEYA ile bağlı iki önermenin ikisi de doğru ise birleşik önerme de doğrudur.

0∙0=0 Birbirine VE ile bağlı iki önermenin ikisi de yanlış ise birleşik önerme de yanlıştır.

• 0+0=0 Birbirine VEYA ile bağlı iki önermenin ikisi de yanlış ise birleşik önerme de yanlıştır.

1∙1=1 Birbirine VE ile bağlı iki önermenin ikisi de doğru ise birleşik önerme de doğrudur.

• 1+0=1 Birbirine VEYA ile bağlı iki önermeden biri doğru ise birleşik önerme de doğrudur.

0∙1=0 Birbirine VE ile bağlı iki önermeden birisi yanlış ise birleşik önerme de yanlıştır.

Page 14: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Boole Cebri Teoremleri

1. a) 𝑎+𝑏=𝑏+𝑎 Değişme Özelliği 𝑏) 𝑎∙𝑏=𝑏∙𝑎 2. a) 𝑎+𝑏+𝑐= 𝑎+𝑏 +𝑐=𝑎+(𝑏+𝑐) Birleşme Özelliği 𝑏) 𝑎∙𝑏∙𝑐= 𝑎∙𝑏 ∙𝑐=𝑎∙(𝑏∙𝑐) 3. a) 𝑎+𝑏∙𝑐= 𝑎+𝑏 ∙(𝑎+𝑐) Dağılma Özelliği 𝑏) 𝑎∙ 𝑏+𝑐 = 𝑎∙𝑏 +(𝑎∙𝑐) 4. a) 𝑎+𝑎=𝑎 Değişkende Fazlalık Özelliği 𝑏) 𝑎∙𝑎=𝑎 5. a) 𝑎+𝑎.𝑏=𝑎 Yutma Özelliği 𝑏) 𝑎∙(𝑎+𝑏)=𝑎 6. a) (𝑎) =𝑎 işlemde Fazlalık Özelliği 𝑏) (𝑎 ) =𝑎 7. a) (𝑎+𝑏+𝑐+⋯) =𝑎 ∙𝑏 ∙𝑐 ∙⋯ De Morgan Kuralı 𝑏) (𝑎∙𝑏∙𝑐∙⋯) =𝑎 +𝑏 +𝑐 +⋯

Page 15: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Boole Cebri Teoremleri

8. a) 𝑎+𝑎 =1 Sabit Özelliği 𝑏) 𝑎∙𝑎 =0 9. a) 0+𝑎=𝑎 Etkisizlik Özelliği 𝑏) 1∙𝑎=𝑎 10. a) 1+𝑎=1 Yutan Sabit Özelliği 𝑏) 0∙𝑎=0 11. a) (𝑎+𝑏 )∙𝑏=𝑎∙𝑏 𝑏) 𝑎∙𝑏 +𝑏=𝑎+𝑏 12. a) 𝑎+𝑏 ∙ 𝑎 +𝑐 ∙ 𝑏+𝑐 = 𝑎+𝑏 ∙(𝑎 +𝑐) 𝑏) 𝑎∙𝑏+𝑎 ∙𝑐+𝑏∙𝑐=𝑎∙𝑏+𝑎 ∙𝑐 13. a) 𝑎+𝑏 ∙ 𝑎 +𝑐 =𝑎∙𝑐+𝑎 ∙𝑏 𝑏) 𝑎∙𝑏+𝑎 ∙𝑐= 𝑎+𝑐 ∙(𝑎 +𝑏) 14. a) 𝑓 𝑎,𝑏,𝑐,𝑑,⋯ =[𝑎+𝑓(0,𝑏,𝑐,𝑑,⋯)]∙[𝑎 +𝑓(1,𝑏,𝑐,𝑑,⋯)] Shannon Teoremi 𝑏) 𝑓 𝑎,𝑏,𝑐,𝑑,⋯ = 𝑎∙𝑓 1,𝑏,𝑐,𝑑,⋯ +[𝑎 ∙𝑓(0,𝑏,𝑐,𝑑,⋯)]

Page 16: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 17: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

17 / 28

DeMorgan’s Theorem

)]([ edcba

)]([ edcba

))(( edcba

))(( edcba

))(( edcba

)( edcba

Page 18: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Conversion of

Minterm and Maxterm

Page 19: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Minimum ve Maksimum Terimler

• 𝑥 ve 𝑦 şeklinde iki terim için minimum terimler (minterm) ve maksimum terimler

(maksterm) aşağıdaki tabloda verilmiştir.

Page 20: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Minimum terimler kanonik biçimi

• Doğruluk tablosu kullanarak çarpımların toplamı çözümü

Page 21: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Maksimum terimler kanonik biçimi

• Doğruluk tablosu kullanarak toplamların çarpımı çözümü

Page 22: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 23: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Conversion of Minterm and Maxterm

)7,5,2,0(7520 mmmmmXYZZYXZYXZYXF

)6,4,3,1(6431 mmmmmZXYZYXYZXZYXF

Page 24: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Conversion of Minterm and Maxterm

)6,4,3,1(

))()()((6431

64316431

6431

M

ZYXZYXZYXZYXMMMMF

mmmmmmmmF

mmmmF

Page 25: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Simplify the function

Page 26: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Logic Circuit Design Process

• A simple logic design process involves – Problem specification

– Truth table derivation

– Derivation of logical expression

– Simplification of logical expression

– Implementation

Page 27: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

27 / 28

Standard Forms • Sum of Products (SOP)

ABCCBACBACBAF

AC

BBAC

)(

CB

AACB

)(

BA

BA

CCBA

)1(

)(

)()()( BBACCCBAAACBF

ACBACBF

Page 28: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

28

Boolean Algebra

• We can use Boolean identities to simplify the function:

as follows:

Page 29: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Logic simplification

• Example: • Z = A'BC + AB'C' + AB'C + ABC' + ABC

= A'BC + AB'(C’ + C) + AB(C' + C) distributive = A'BC + AB’ + AB complementary = A'BC + A(B' + B) distributive = A'BC + A complementary

= BC + A absorption #2 Duality

(X •Y')+Y=X+Y with X=BC and Y=A

Page 30: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 31: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

31

Structural Operations Restructuring Problem: Given initial network, find best network.

Example: f1 = abcd+abce+ab’cd’+ab’c’d’+a’c+cdf+abc’d’e’+ab’c’df’

f2 = bdg+b’dfg+b’d’g+bd’eg

minimizing,

f1 = bcd+bce+b’d’+a’c+cdf+abc’d’e’+ab’c’df’

f2 = bdg+dfg+b’d’g+d’eg

factoring,

f1 = c(b(d+e)+b’(d’+f)+a’)+ac’(bd’e’+b’df’)

f2 = g(d(b+f)+d’(b’+e))

decompose,

f1 = c(x+a’)+ac’x’

f2 = gx

x = d(b+f)+d’(b’+e)

Two problems:

• find good common subfunctions

• effect the division

Page 32: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

32

Structural Operations Basic Operations:

1. Decomposition (single function)

f = abc+abd+a’c’d’+b’c’d’

f = xy+x’y’ x = ab y = c+d

2. Extraction (multiple functions)

f = (az+bz’)cd+e g = (az+bz’)e’ h = cde

f = xy+e g = xe’ h = ye x = az+bz’ y = cd

3. Factoring (series-parallel decomposition)

f = ac+ad+bc+bd+e

f = (a+b)(c+d)+e

4. Substitution

g = a+b f = a+bc

f = g(a+b)

5. Collapsing (also called elimination)

f = ga+g’b g = c+d

f = ac+ad+bc’d’ g = c+d

Note: “division” plays a key role in all of these

Page 33: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Örnek

• Girişine giren 2 bitlik sayıların karesini alan lojik devreyi doğruluk tablosu çıkararak hesaplayınız.

Page 34: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 35: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 36: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 37: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

The Karnaugh Map

Page 38: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Lojik fonksiyonların sadeleştirilmesi

• Lojik fonksiyonların sadeleştirilmesinde en çok kullanılan iki yöntem şunlardır:

• 1. Karnaugh Diyagramı Yöntemi

• 2. Quine-McCluskey Tablo Yöntemi

Page 39: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Adjacent cells on a Karnaugh map are those that differ by only one variable. Arrows point between adjacent cells.

Page 40: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 41: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 42: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 43: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Problems

Page 44: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Problems

Page 45: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Örnek • 𝐴=𝐴1, 𝐴0 ve 𝐵=𝐵1, 𝐵0 sayıları karşılaştırılacaktır. 𝐴>𝐵, 𝐴=𝐵 ve 𝐴<𝐵 çıkışlarını veren devreyi doğruluk

tablosunu çıkartarak Karnaugh diyagramı ile gerçekleştiriniz.

Page 46: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 47: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 48: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 49: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 50: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Combinational Circuits

Page 51: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Tümleşik Kombinasyonel Devreler

Belirli bir işii yerine getiren kapılarla tasarlanmış devrelerdir.

• Yarı ve tam toplayıcılar,

• seçiciler,

• kodlayıcılar,

• PAL (Programlanabilir Dizi Elemanı),

• PLA (Programlanabilir Lojik Dizi Elemanı)

• Çoğullayıcılar gibi elemanlar sayılabilir.

Page 52: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Introduction to Combinational Circuits

• Combinational circuits • Output depends only on the current inputs

• Combinational circuits provide a higher level of abstraction

– Help in reducing design complexity

– Reduce chip count

• We look at some useful combinational circuits

Page 53: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 54: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Combinational Logic

Programmable Logic Array Example

X Fuse intact

Fuse blown

0

1

F 1

F 2

A

B

C

C B A C B A

1

2

4

3

X X

X X

X X

X X X

X

X

X X

X

X

X

X

X

F1= A’B’C+A’BC’+AB’C’=(AB+AC+BC+A’B’C’)’ F2=AB+AC+BC

Page 55: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

55 / 65

Analysis Procedure • Boolean Expression Approach

C

BA

C

BA

BA

CA

CB

F1

F2

ABC A+B+C

AB+AC+BC

(A’+B’)(A’+C’)(B’+C’)

AB'C'+A'BC'+A'B'C

F1=AB'C'+A'BC'+A'B'C+ABC

F2=AB+AC+BC

Page 56: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

56 / 65

C

BA

C

BA

BA

CA

CB

F1

F2

Analysis Procedure • Truth Table Approach

= 1 = 1 = 1 = 1 = 1 = 1

= 1 = 1

= 1 = 1

= 1 = 1

1

1

1

1

1

1

0

0

1

A B C F1 F2

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

B

0 1 0 1

A 1 0 1 0

C

B

0 0 1 0

A 0 1 1 1

C

F1=AB'C'+A'BC'+A'B'C+ABC F2=AB+AC+BC

Page 57: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 58: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 59: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 60: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by
Page 61: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

61 / 65

Design Procedure • BCD-to-Excess 3 Converter

A B C D w x y z

0 0 0 0 0 0 1 1

0 0 0 1 0 1 0 0

0 0 1 0 0 1 0 1

0 0 1 1 0 1 1 0

0 1 0 0 0 1 1 1

0 1 0 1 1 0 0 0

0 1 1 0 1 0 0 1

0 1 1 1 1 0 1 0

1 0 0 0 1 0 1 1

1 0 0 1 1 1 0 0

1 0 1 0 x x x x

1 0 1 1 x x x x

1 1 0 0 x x x x

1 1 0 1 x x x x

1 1 1 0 x x x x

1 1 1 1 x x x x

C

1 1 1 B

A x x x x

1 1 x x

D

C

1 1 1

1 B

A x x x x

1 x x

D

C

1 1

1 1 B

A x x x x

1 x x

D

C

1 1

1 1 B

A x x x x

1 x x

D

w = A+BC+BD x = B’C+B’D+BC’D’

y = C’D’+CD z = D’

Page 62: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

62 / 65

Design Procedure • BCD-to-Excess 3 Converter

A B C D w x y z

0 0 0 0 0 0 1 1

0 0 0 1 0 1 0 0

0 0 1 0 0 1 0 1

0 0 1 1 0 1 1 0

0 1 0 0 0 1 1 1

0 1 0 1 1 0 0 0

0 1 1 0 1 0 0 1

0 1 1 1 1 0 1 0

1 0 0 0 1 0 1 1

1 0 0 1 1 1 0 0

1 0 1 0 x x x x

1 0 1 1 x x x x

1 1 0 0 x x x x

1 1 0 1 x x x x

1 1 1 0 x x x x

1 1 1 1 x x x x

w

x

D

C

z

y

B

A

w = A + B(C+D)

x = B’(C+D) + B(C+D)’

y = (C+D)’ + CD

z = D’

Page 63: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

63 / 65

Seven-Segment Decoder a

b

c

g

e

d

f ? w

x

y

z

a b c d e f g

w x y z a b c d e f g

0 0 0 0 1 1 1 1 1 1 0

0 0 0 1 0 1 1 0 0 0 0

0 0 1 0 1 1 0 1 1 0 1

0 0 1 1 1 1 1 1 0 0 1

0 1 0 0 0 1 1 0 0 1 1

0 1 0 1 1 0 1 1 0 1 1

0 1 1 0 1 0 1 1 1 1 1

0 1 1 1 1 1 1 0 0 0 0

1 0 0 0 1 1 1 1 1 1 1

1 0 0 1 1 1 1 1 0 1 1

1 0 1 0 x x x x x x x

1 0 1 1 x x x x x x x

1 1 0 0 x x x x x x x

1 1 0 1 x x x x x x x

1 1 1 0 x x x x x x x

1 1 1 1 x x x x x x x

y

1 1 1

1 1 1 x

w x x x x

1 1 x x

z

BCD code

a = w + y + xz + x’z’ b = . . . c = . . .

d = . . .

Page 64: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Seven-Segment Decoder

Page 65: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Circuits for Binary Addition

Page 66: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

66

Circuits for Binary Addition Half Adder

With twos complement numbers, addition is sufficient

Ai 0 0 1 1

Bi 0 1 0 1

Sum 0 1 1 0

Carry 0 0 0 1

AiBi

0 1

0

1

0 1

1 0

Sum = Ai Bi + Ai Bi

= Ai + Bi

AiBi

0 1

0

1

0 0

10

Carry = Ai Bi

Half-adder Schematic Carry

Sum A i

B i

Page 67: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

67

Full Adder

+

A3 B3

S3

+

A2 B2

S2

+

A1 B1

S1

+

A0 B0

S0C1C2C3

Cascaded Multi-bit Adder

usually interested in adding more than two bits this motivates the need for the full adder

Page 68: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

ECE C03 Lecture 6 68

Full Adder A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

CI 0 1 0 1 0 1 0 1

S 0 1 1 0 1 0 0 1

CO 0 0 0 1 0 1 1 1

A B

CI

0

1

00 01 11 10

0

1

1

0

1

0

0

1

A B

CI

0

1

00 01 11 10

0

0

0

1

0

1

1

1

S

CO

S = CI xor A xor B CO = B CI + A CI + A B = CI (A + B) + A B

Page 69: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

69

Full Adder Circuit

A

A A

B

B B

CI

CI S

CO

Alternative Implementation: 5 Gates

Half

Adder

A

B

Half

Adder

A + B

CI

A + B + CI S S

CO CO CI (A + B) A B

S

CO

A B + CI (A xor B) = A B + B CI + A CI

Standard Approach: 6 Gates

+

Page 70: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

70

Adder/Subtractor

A - B = A + (-B) = A + B + 1

A B

CO

S

+ CI

A B

CO

S

+ CI

A B

CO

S

+ CI

A B

CO

S

+ CI

0 1

Add/Subtract

A 3

B 3

B 3

0 1

A 2

B 2

B 2

0 1

A 1

B 1

B 1

0 1

A 0

B 0

B 0

Sel Sel Sel Sel

S 3

S 2

S 1

S 0

Overflow

Page 71: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Yarı toplayıcı (Half Adder)

• Yarı toplayıcı elde girişi olmaksızın 1 bitlik iki sayının toplamını bulan bir kombinasyonel devredir.

Page 72: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Tam toplayıcı (Full Adder) • Girişinde elde bitinin olduğu ve bir bitlik iki sayı ile birlikte toplandığı bir

kombinasyonel devredir.

Page 73: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

73

Combinational Circuits

• full adder.

Page 74: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Multiplexers

Page 75: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

MULTIPLEXER 4-to-1 Multiplexer

I0

I1

I2

I3

S0

S1

Y

0 0 I0

0 1 I1

1 0 I2

1 1 I3

Select Output S1 S0 Y

Page 76: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Multiplexers

• Multiplexer

– 2n data inputs

– n selection inputs

– a single output

• Selection input determines the input that should be connected to the output

4-data input MUX

Page 77: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Multiplexers

4-data input MUX implementation

Page 78: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Multiplexers

MUX implementations

Page 79: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Multiplexers

Example chip: 8-to-1 MUX

Page 80: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Multiplexers

Efficient implementation: Majority function

Page 81: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Demultiplexers

Demultiplexer (DeMUX)

Page 82: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Decoders

Page 83: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Decoders

• Decoder selects one-out-of-N inputs

Page 84: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Decoders

Logic function implementation

(Full Adder)

Page 85: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Comparator

Page 86: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Comparator

• Used to implement comparison operators (= , > , < , , )

Page 87: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Comparator

4-bit magnitude comparator chip

A=B: Ox = Ix (x=A<B, A=B, & A>B)

Page 88: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Comparator

Serial construction of an 8-bit comparator

Page 89: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

1-bit Comparator

x y

x>y

x=y

x<y

x y x>y x=y x<y

CMP

Page 90: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Adders

Page 91: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Adders

• Half-adder – Adds two bits

• Produces a sum and carry

– Problem: Cannot use it to build larger inputs

• Full-adder – Adds three 1-bit values

• Like half-adder, produces a sum and carry

– Allows building N-bit adders • Simple technique

– Connect Cout of one adder to Cin of the next

• These are called ripple-carry adders

Page 92: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Adders

Page 93: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Adders

A 16-bit ripple-carry adder

Page 94: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Adders

• Ripple-carry adders can be slow – Delay proportional to number of bits

• Carry lookahead adders – Eliminate the delay of ripple-carry adders

– Carry-ins are generated independently

• C0 = A0 B0 • C1 = A0 B0 A1 + A0 B0 B1 + A1 B1

• . . .

– Requires complex circuits

– Usually, a combination carry lookahead and ripple-carry techniques are used

Page 95: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Örnek • Devreye ait Z lojik fonksiyonunu doğruluk tablosu ile oluşturarak Karnough

diyagramı yardımıyla elde ediniz.

Page 96: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Örnek

• Şekildeki telefon sisteminde konuşmada öncelik sırası 𝐴,𝐵 ve 𝐶’ dir. Santral bu önceliği seçerek çıkış verecektir. Bu sistemi gerçekleştiriniz (Konuşma isteğinde santral 1 sinyali verecektir).

Page 97: Digital Logic Designckk.com.tr/ders/logicgates/Sunum 2 Combinational Logics.pdfTemel Lojik Kapılar -1 • Simple gates – AND – OR – NOT • Functionality can be expressed by

Kaynakça

• https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-111-introductory-digital-systems-laboratory-spring-2006/lecture-notes/

• http://web.ee.nchu.edu.tw/~cpfan/FY92b-digital/Chapter-4.ppt

• http://www.cs.nccu.edu.tw/~whliao/ds2003/ds4.ppt

• http://www.just.edu.jo/~tawalbeh/cpe252/slides/CH1_2.ppt

• Lessons In Electric Circuits, Volume IV { Digital By Tony R. Kuphaldt Fourth Edition, last update July 30, 2004.

• Digital Electronics Part I – Combinational and Sequential Logic Dr. I. J. Wassell.

• Digital Design With an Introduction to the Verilog HDL, M. Morris Mano Emeritus Professor of Computer Engineering California State University, Los Angeles; Michael D. Ciletti Emeritus Professor of Electrical and Computer Engineering University of Colorado at Colorado Springs.

• Digital Logic Design Basics, Combinational Circuits, Sequential Circuits, Pu-Jen Cheng.