0% found this document useful (0 votes)
11 views76 pages

Lecture5 Combinational Logic

Uploaded by

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

Lecture5 Combinational Logic

Uploaded by

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

Combinational Logic

Mantık Devreleri
Yard.Doç.Dr.Mutlu BOZTEPE
Half Adder
A + B =  and a carry ( this is math not logic)
A B  Carry
0 0 0 0
=AB
0 1 1 0
Carry = AB
1 0 1 0
This is logic not math
1 1 0 1
Half adder logic diagram
Full adder

 = (A  B) Cin + (A  B ) Cin
or
 = (A  B)  Cin
Cout = AB + (A  B)Cin
Full adder logic diagram
Full-adder implemented with half-
adders
Examples
1 0 0
0 1 1

Determine the outputs


Block diagram of a basic 2-bit parallel adder
using two full-adders
Example
A 4-bit parallel adder
Four-bit parallel adders
Examples of adder expansion
Two 74LS83A adders connected as an 8-bit
parallel adder (pin numbers are in
parentheses).
A voting
system
using full-
adders and
parallel
binary
adders
Ripple Carry vs. Look-Ahead Carry?
Both types of adders are the same in terms of inputs and
outputs. Difference is the speed at which they can add
numbers.
Look-ahead carry adder are faster than the ripple carry adder.

Ripple Carry adder


Look-Ahead Carry adder (1)
Carry generation Carry propagation
Look-Ahead Carry adder (2)
All the output
carries are
immediately
available!
No need to
wait for ripple
carry through
all stages
Comparator
Logic diagram for equality comparison of
two 2-bit numbers
Example(Compare)
Logic symbol for a 4-bit comparator with
inequality indication
Example
What is the outputs?

HIGH

LOW

LOW
74HC85 4-bit magnitude comparator
(pin numbers are in parentheses).
An 8-bit magnitude comparator using two
74HC85s
Functions of
Combination Logic
Kod Çözücüler (Decoders)
 Kod çözücülerin işlevi, belirtilen bir giriş
kombinasyonu girişte oluştuğunda bunu
çıkışında bir lojik seviye veya başka bir
biçimde gösteren devrelerdir.
 Binary to decimal decoders
 BCD to decimal decoders
 BCD to 7-segment decoders
 vs.
Basic binary decoder
Girişte 1001 kombinasyonu olduğunda 1 çıkışı veren bir kodçözücü devresi

Girişte 1011 kombinasyonu olduğunda 1 çıkışı veren bir kodçözücü devresi


3 to 8 binary to decimal decoder
Active HIGH!

Doğruluk tablosu (Truth table)


Outputs
Decimal Binary Inputs Logic
Function D0 D1 D2 D3 D4 D5 D6 D7

0 0 0 0 1 0 0 0 0 0 0 0

1 0 0 1 0 1 0 0 0 0 0 0

2 0 1 0 0 0 1 0 0 0 0 0

3 0 1 1 0 0 0 1 0 0 0 0

4 1 0 0 0 0 0 0 1 0 0 0

5 1 0 1 0 0 0 0 0 1 0 0

6 1 1 0 functions and truth tables


Decoding 0 0 the 3-line-to-8-line
for 0 0 0
decoder 0 1 0

7 1 1 1 0 0 0 0 0 0 0 1
Lojik devresi

3 to 8 binary to
decimal
decoder
74LS138 3 to 8 binary to decimal decoder

Active-low !!
4 to 16 binary to decimal
decoder

Figure 6--24 Logic


symbol for a 4-line-to-

Decimal number
Binary number
16-line (1-of-16)
decoder. Open file
F06-24 to verify
operation.
Pin diagram and logic symbol for the
74HC154 1-of-16 decoder.
A 5-bit decoder using 74HC154s.
A simplified
computer I/O port
system with a
port address
decoder with only
four address
lines shown.
The 74HC42 BCD-to-decimal decoder
(4-line-to-10-line decoder or a 1-of-10 decoder)
The 74HC42 BCD-to-decimal decoder
Logic symbol for a BCD-to-7-segment
decoder/driver with active-LOW outputs.

Two 7-segment
display
Pin diagram and logic symbol for the 74LS47
BCD-to-7-segment decoder/driver
Kodlayıcılar (Encoders)
 Kod çözücü (decoding) işleminin tersini
yaparlar.
 Decimal to binary encoders
 Decimal to BCD encoders
 Line encoders (like 8-to-3 line encoders)
 vs.
Logic symbol for a decimal-to-BCD encoder.

A3=8+9
A2=4+5+6+7
A1=2+3+6+7
A0=1+3+5+7+9
Basic logic diagram of a decimal-to-BCD encoder. A
0-digit input is not needed because the BCD outputs
are all LOW when there are no HIGH inputs.

A3=8+9
A2=4+5+6+7
A1=2+3+6+7
A0=1+3+5+7+9
74HC147 decimal-to-BCD priority encoder
(HPRI means highest value input has priority).
74F148 8-line-to-3-line priority encoder.
A 16-line-to-4 line encoder using 74F148s
and external logic.
A simplified
keyboard
encoder.
Code converters
 BCD-to-binary conversion
 Binary-to-Gray
 Gray-to-Binary
BCD to Binary – Method 1
BCD to Binary – Method 1
87  1000 0111 80 = 8x10
40 = 4x10
8 7 1 = 1x1
10 = 1x10

Tens digit Units digits


Weights 80 40 20 10 8 4 2 1
Bit designation B3 B2 B1 B0 A3 A2 A1 A0
87 = 80+0+0+0+0+4+2+1
Her bir bit’in ağırlıkları toplanırsa binary karşılık elde edilir.
BCD to Binary – Method 2
 BCD sayıyı sağa bir kaydır. Her bir basamağı
(decade) incele. Değeri 7’den büyük olan
basmaklardan 3 çıkar. (Exp: 14 decimal in BCD
10100)
Gray Code Gray code is a code that
is not weighted

Decimal Gray Code Binary


0 0000 0000
1 0001 0001
Note that in gray code
2 0011 0010 only one bit is changing
at a time while in binary
3 0010 0011
code many bits may
4 0110 0100 change at a time
5 0111 0101
6 0101 0110
7 0100 0111
Binary  Gray conversions
Example
Multiplexer
Multiplexer
 S0 ve S1 “data select” girişlerinin değerine bağlı olarak
“Data inputs” girişlerinden bir tanesi seçilerek Y
çıkışına aktarılır

S1 S0 Input
selected
0 0 D0
0 1 D1
1 0 D2
1 1 D3
Multiplexer
74HC157A quadruple 2-input data
selector/multiplexer
74HC153 dual four-input data
selector/multiplexer

The G0/3 dependency notation indicates an AND


relationship between the two select inputs (A
and B) and the inputs to each multiplexer block.
74LS151 8-input data selector/multiplexer
A 16-input multiplexer
Multiplexer
Application

Simplifying 7-segment
display
Implementing a logic function
using multiplexer

Soru?
Implement the logic function in Table by using a 74LS151 8-input data
selector / multiplexer. Compare this method with a discrete logic gate
implementation.
Implementing a logic function
using multiplexer
Implementing a logic
function 4-input
Implementing a logic function
using multiplexer

F(X,Y,Z) = X'Y'Z + X'YZ + XY'Z + XYZ' + XYZ


Demultiplexer
Demultiplexers
The 74HC154 decoder used as a
demultiplexer
Parity
The 74LS280 9-bit parity
generator/checker
Parity
application
Example of data transmission with and
without error for the system in previous
application
Glitch
Birden çok giriş aynı anda durum değiştirirse, geçiş anlarında
farklı giriş kombinasyonları oluşur. Bun bağlı olarak çıkış farklı
(istenmeyen) değerler alır.
Figure 6--59 Decoder waveform displays showing how
transitional input states produce glitches in the output
waveforms.
Strobe signal is used to
eliminates glitches

You might also like