Lecture5 Combinational Logic
Lecture5 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
=AB
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
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
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
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
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
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
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