Rangkaian Encoder dan Decoder Digital
Rangkaian Encoder dan Decoder Digital
PRIORITY
ENCODER Priority Encoder
IC Encoder
Tabel Kebenaran : Encoder 4 to 2
ENCODER
4 TO 2 INPUT OUTPUT
D3 D3 D2 D1 D0 B A
4 D2 B OUTPUT 0 0 0 1 0 0
INPUT D1 A 2-Bit 0 0 1 0 0 1
D0 0 1 0 0 1 0
1 0 0 0 1 1
ENCODER Persamaan Logika :
MSB LSB
21 20
Rangkaian Encoder berfungsi B = D2 + D3 2 1
menterjemahkan salah satu inputnya A = D1 + D3 Bobot Bilangan
Biner
menjadi urutan bit-bit biner. ENCODER
Rangkaian Encoder memiliki sejumlah
jalur input, hanya satu yang diaktifkan D3 MSB
pada waktu tertentu, dan
B
menghasilkan kode output N-bit, D2 OUTPUT
4
tergantung pada input mana yang 2-Bit
INPUT
diaktifkan. D1 A
Encoder 2N = X LSB
D0
dimana :
X = Jumlah jalur input maksimal.
Encoder 4 to 2
N = Jumlah bit output.
Tabel Kebenaran : Encoder 4 to 2
ENCODER
4 TO 2 INPUT OUTPUT
D3 D3 D2 D1 D0 B A
4 D2 B OUTPUT 0 0 0 1 0 0
INPUT D1 A 2-Bit 0 0 1 0 0 1
KARNAUGH MAP D0 0
1
1
0
0
0
0
0
1
1
0
1
ENCODER 4 to 2 MSB
21 20
LSB
PRIORITY ENCODER D0 0
0
0
1
1
x
x
x
0
1
1
0
1 x x x 1 1
Priority Encoder adalah encoder dengan fungsi MSB LSB
prioritas. Jika dua atau lebih input yang akan
21 20
diterjemahkan menjadi urutan bit-bit biner, 2 1
maka output akan sesuai dengan input yang Bobot Bilangan
memiliki prioritas tertinggi. Output B : Output A : Biner
Penentuan Persamaan output B dan A
menggunakan Karnaugh map sebagai berikut : D1D0 D1D0
00 01 11 10 00 01 11 10
Karnaugh Map 4 Variabel : D3, D2, D1, dan D0. D3D2 D3D2
Tuliskan output yang ada pada Tabel
Kebenaran dalam setiap cell sesuai variable
00 x 0 0 0 00 x 0 1 1
pada K-Map dan simulasi setiap input 01 1 1 1 1 01 0 0 0 0
“DON’T CARE” (x), dengan nilai x=0 dan
x=1 secara bergantian. 11 1 1 1 1 11 1 1 1 1
Buat Persamaan logika untuk masing- 10 1 1 1 1 10 1 1 1 1
masing output sesuai pengelompokan K-
MAP, dengan nilai x disesuaikan dengan Persamaan Logika : Persamaan Logika :
kebutuhan pengelompokan cell K-MAP. B = D2 + D3 A = D3 + D1 D2
22 21 20
Tabel : Encoder 8 to 3
INPUT OUTPUT Persamaan Logika :
D7 D6 D5 D4 D3 D2 D1 D0 C B A C = D4 + D5 + D6 + D7
0 0 0 0 0 0 0 1 0 0 0 B = D2 + D3 + D6 + D7
0 0 0 0 0 0 1 0 0 0 1 A = D1 + D3 + D5 + D7
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
ENCODER 8 to 3 0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
OCTAL TO BINARY ENCODER 1 0 0 0 0 0 0 0 1 1 1
8 D7 D6 D5 D4 D3 D2 D1 D0
ENCODER INPUT
D7
MSB
D6
D5 C
C
8 D4 OUTPUT
B
INPUT D3 3-Bit
D2 A
D1 B OUTPUT
D0 3-Bit
A
LSB
IC TTL SN54/74LS147 Priority Encoder 10 Line to 4 Line
INPUT
13
12
11
10
4
3
2
5
1
7
6
5
3
2
1
8
4
9
74147
IC ENCODER
D 14
C 6
B 7
A 9
Contoh IC Priority Encoder yang IC TTL SN54/74147, SN54/74LS147
digunakan antara lain : Priority Encoder 10 Line to 4 Line
IC Encoder TTL 74147 menjalankan INPUT OUTPUT
1 2 3 4 5 6 7 8 9 D C B A
fungsi Desimal ke BCD. 1 1 1 1 1 1 1 1 1 1 1 1 1
220 220
x x x x x x x x 0 0 1 1 0
IC Encoder TTL 74148 melakukan x x x x x x x 0 1 0 1 1 1
encoder prioritas 8-input. x x x x x x 0 1 1 1 0 0 0
LED LED
input = aktif Low (0) x
x
x
x
x
x
x
x
x
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
1
0
output = aktif low (0) x x x 0 1 1 1 1 1 1 0 1 1
x x 0 1 1 1 1 1 1 1 1 0 0
x 0 1 1 1 1 1 1 1 1 1 0 1 GND GND GND GND
0 1 1 1 1 1 1 1 1 1 1 1 0
Keterangan :
TTL = Transistor Transistor Logic
NC = No Connection
x = Don’t care
Decimal-to BCD switch encoder.
Contoh :
IC Encoder TTL 74147 dapat digunakan
sebagai :
10 sakelar mewakili angka 0 hingga 9,
Sakelar yang digunakan adalah type
push button.
Saat push-button tidak ditekan, input
encoder akan TINGGI, sehingga output
BCD adalah 0000 (setelah INVERTER).
Saat salah satu push button ditekan,
rangkaian akan menghasilkan kode
BCD yang sesuai.
Jika push-button ditekan secara
bersamaan akan menghasilkan kode
BCD sesuai dengan push-button yang
bernomor lebih tinggi, karena 74LS147
merupakan encoder prioritas.
IC TTL SN54/74LS148 Priority Encoder 8 Line to 3 Line
INPUT
12
11
10
13
3
2
1
4
5
IC ENCODER
EI
6
5
4
2
1
0
3
7
IC TTL SN54/74LS148 Priority Encoder 8 Line 74148
to 3 Line
EO
GS
A2
A1
AO
Input = aktif Low (0)
15
14
6
7
9
Data input (D7 .... D0)
EI (Enable Input)
Tabel Kebenaran IC TTL SN54/74148,
Output = aktif low (0)
74LS148 Priority Encoder 8 Line to 3 Line
Data output (A2, A1, A0) INPUT OUTPUT 220 220
EO (Enable Output) EI 0 1 2 3 4 5 6 7 C B A GS EO
1 x x x x x x x x 1 1 1 1 1
GS (menandakan salah satu input diaktifkan), 0 1 1 1 1 1 1 1 1 1 1 1 1 0
APLIKASI : 0 x x x x x x x 0 0 0 0 0 1
LED LED
0 x x x x x x 0 1 0 0 1 0 1
Kontrol posisi dalam navigasi kapal. 0 x x x x x 0 1 1 0 1 0 0 1
Penentuan posisi lengan robot. 0 x x x x 0 1 1 1 0 1 1 0 1
0 x x x 0 1 1 1 1 1 0 0 0 1
Mengurangi jumlah koneksi dan kabel dalam 0 x x 0 1 1 1 1 1 1 0 1 0 1 GND GND GND GND GND
0 x 0 1 1 1 1 1 1 1 1 0 0 1
aplikasi keyboard atau keypad. 0 0 1 1 1 1 1 1 1 1 1 1 0 1
Encoder prioritas mendeteksi interupsi dalam
Keterangan :
aplikasi mikroprosesor, kode biner akan x = Don’t care
dikirimkan melalui jaringan untuk melindungi TTL = Transistor Transistor Logic
dari peretas.
DECODER
Mahasiswa dapat merancang Rangkaian Decoder dengan IC SSI dan IC
MSI
Decoder
DECODER
IC Decoder
Tabel : Decoder 2 to 4
DECODER INPUT OUTPUT
Y3 B A Y3 Y2 Y1 Y0
INPUT B Y2 4 0 0 0 0 0 1
2-Bit A Y1 OUTPUT 0 1 0 0 1 0
Y0 1 0 0 1 0 0
1 1 1 0 0 0
DECODER 2 to 4
DECODER Persamaan Logika :
Y0 = 𝑩 𝑨 Y3
Rangkaian Decoder adalah rangkaian Y1 = 𝑩 A
logika yang menerima input-input Y2 = B 𝑨 Y2
biner N-bit dan menghasilkan output Y3 = B A 4
yang sesuai dengan urutan biner input- OUTPUT
nya. Y1
Decoder 2N = X
dimana : Y0
N = Jumlah bit intput.
X = Jumlah jalur output
INPUT
MSB B A LSB
2 Bit
DECODER 3 to 8
Y7
Y6
DECODER 3 to 8 Y5
Tabel : Decoder 3 to 8
Y4
INPUT OUTPUT 8
C B A Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 OUTPUT
Y3
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0 Y2
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0 Y1
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Y0
Persamaan Logika :
Y0 = 𝑪 𝑩 𝑨 Y4 = C 𝑩 𝑨
Y1 = 𝑪 𝑩 A Y5 = C 𝑩 A
Y2 = 𝑪 B 𝑨 Y6 = C B 𝑨
Y3 = 𝑪 B A Y7 = C B A INPUT
MSB C B A LSB 3 Bit
IC TTL SN54/74LS42 4 LINE BCD TO 10 LINE DECIMAL
INPUT
15
14
13
12
A0 A1 A2 A3
IC DECODER 7442
0
1
2
3
4
5
6
7
8
9
IC TTL SN54/74LS42
4 LINE BCD TO 10 LINE DECIMAL
10
11
5
2
3
4
6
7
9
1
Tabel Kebenaran IC TTL SN54/74148,
Input = Aktif High (1)
74LS148 Priority Encoder 8 Line to 3 Line
Output = aktif low (0)
INPUT OUTPUT
A3 A2 A1 A0 0 1 2 3 4 5 6 7 8 9 220
-------------------
0 0 0 0 0 1 1 1 1 1 1 1 1 1
0 0 0 1 1 0 1 1 1 1 1 1 1 1
0 0 1 0 1 1 0 1 1 1 1 1 1 1
0 0 1 1 1 1 1 0 1 1 1 1 1 1 LED
0 1 0 0 1 1 1 1 0 1 1 1 1 1
0 1 0 1 1 1 1 1 1 0 1 1 1 1
0 1 1 0 1 1 1 1 1 1 0 1 1 1
0 1 1 1 1 1 1 1 1 1 1 0 1 1 GND GND GND GND
1 0 0 0 1 1 1 1 1 1 1 1 0 1
1 0 0 1 1 1 1 1 1 1 1 1 1 0
Keterangan :
TTL = Transistor Transistor Logic
Seven segment digunakan untuk menampilkan data decimal : 0,
1, 2, 3, 4, 5, 6, 7, 8, dan 9.
Konfigurasi yang ada untuk seven segment adalah :
Common Anoda.
Common Cathode. “on”
RL
BCD-TO-7-SEGMENT “1”
I
DECODER/DRIVERS 𝑽𝒄𝒄
Common Cathode
Common Anoda
I
“0”
RL
“on”
Tabel Kebenaran : Decoder BCD to 7 Segment
INPUT OUTPUT
D C B A 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
Latihan :
Buatlah Persamaan dan rangkaian logika Decoder BCD to 7
Segment untuk masing-masing output a, b, c, d, e, f, dan g
Penyelesaian :
BCD-TO-7-SEGMENT Persamaan Output a : Persamaan Output b :
DECODER/DRIVERS BA
00 01 11 10
BA
00 01 11 10
Tabel Kebenaran : Decoder BCD to 7 Segment DC DC
INPUT OUTPUT 00 1 0 1 1 00
D C B A a b c d e f g
0 0 0 0 1 1 1 1 1 1 0 01 0 1 1 1 01
0 0 0 1 0 1 1 0 0 0 0
0 0 1 0 1 1 0 1 1 0 1
11 x x x x 11
0 0 1 1 1 1 1 1 0 0 1 10 1 1 x x 10
0 1 0 0 0 1 1 0 0 1 1
0
0
1 0
1 1
1
0
1
1
0
0
1
1
1
1
0
1
1
1
1
1
Persamaan Logika : Persamaan Logika :
0
1
1 1
0 0
1
0
1
1
1
1
1
1
0
1
0
1
0
1
0
1
a=D +B +CA+C𝐀 b=
1 0 0 1 1 1 1 1 0 1 1
Persamaan Output c : Persamaan Output d :
BA BA
00 01 11 10 00 01 11 10
DC DC
00 1 1 1 0 00 1 0 1 1
PENYELESAIAN : 01
11
1
x
1
x
1
x
1
x
01
11
0
x
1
x
0
x
1
x
Tabel Kebenaran : Decoder BCD to 7 Segment 10 1 1 x x 10 1 1 x x
INPUT OUTPUT
D C B A a b c d e f g
0 0 0 0 1 1 1 1 1 1 0
Persamaan Logika : Persamaan Logika :
0 0 0 1 0 1 1 0 0 0 0 c= d=
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 Persamaan Output e : Persamaan Output f : Persamaan Output g :
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
BA BA BA
00 01 11 10 00 01 11 10 00 01 11 10
1 0 0 1 1 1 1 1 0 1 1 DC DC DC
00 1 0 0 1 00 1 0 0 0 00 0 0 1 1
01 0 0 0 1 01 1 1 0 1 01 1 1 0 1
11 x x x x 11 x x x x 11 x x x x
10 1 0 x x 10 1 1 x x 10 1 1 x x
Persamaan Logika : Persamaan Logika : Persamaan Logika :
e= f= g=
Tabel Kebenaran : IC 7447 Decoder BCD to seven segment
0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 A
1 1 X 0 0 0 1 1 1 0 0 1 1 1 1 A
2 1 X 0 0 1 0 1 0 0 1 0 0 1 0
3 1 X 0 0 1 1 1 0 0 0 0 1 1 0
IC 7447 DECODER BCD 4
5
1
1
X
X
0
0
1
1
0
0
0
1
1
1
1
0
0
1
0
0
1
0
1
1
0
0
0
0
TO SEVEN SEGMENT
𝑽𝒄𝒄
6
7
1
1
X
X
0
0
1
1
1
1
0
1
1
1
1
0
1
0
0
0
0
1
0
1
0
1
0
1
8 1 X 1 0 0 0 1 0 0 0 0 0 0 0
5 RBI 9 1 X 1 0 0 1 1 0 0 0 1 1 0 0
220 RL
4 BI/RBO 10 1 X 1 0 1 0 1 1 1 1 0 0 1 0
3 LT 11 1 X 1 0 1 1 1 1 1 0 0 1 1 0
14 g 12 1 X 1 1 0 0 1 1 0 1 1 1 0 0
g
6 7 f 15 f 13 1 X 1 1 0 1 1 0 1 1 0 1 0 0
D 9 e 14 1 X 1 1 1 0 1 1 1 1 0 0 0 0
2
C
4 e
d 10 d 15 1 X 1 1 1 1 1 1 1 1 1 1 1 1
BI X X X X X X 0 1 1 1 1 1 1 1 B
1
B 4 c 11 c
RBI 1 0 0 0 0 0 0 1 1 1 1 1 1 1 C
12 b
7
A 7 b
a 13 a
LT 0 X X X X X 1 0 0 0 0 0 0 0 D
CA NOTES:
(A) BI/RBO is wire-AND logic serving as blanking Input (BI) and/or ripple-blanking output (RBO). The blanking out (BI) must be open or held
at a HIGH level when output functions 0 through 15 are desired, and ripple-blanking input (RBI) must be open or at a HIGH level if blanking
of a decimal 0 is not desired. X = input may be HIGH or LOW.
(B) When a LOW level is applied to the blanking input (forced condition) all segment outputs go to a LOW level regardless of the state of
any other input condition.
(C) When ripple-blanking input (RBI) and inputs A, B, C, and D are at LOW level, with the lamp test input at HIGH level, all segment outputs
go to a HIGH level and the ripple-blanking output (RBO) goes to a LOW level (response condition).
(D) When the blanking input/ripple-blanking output (BI/RBO) is open or held at a HIGH level, and a LOW level is applied to lamp test input, all segment
outputs go to a LOW level.
Tabel Kebenaran : IC 7448 Decoder BCD to seven segment
0 1 1 0 0 0 0 1 1 1 1 1 1 1 0 A
1 1 X 0 0 0 1 1 0 1 1 0 0 0 0 A
2 1 X 0 0 1 0 1 1 1 0 1 1 0 1
3 1 X 0 0 1 1 1 1 1 1 1 0 0 1
IC 7448 DECODER BCD 4
5
1
1
X
X
0
0
1
1
0
0
0
1
1
1
0
1
1
0
1
1
0
1
0
0
1
1
1
1
TO SEVEN SEGMENT 6
7
1
1
X
X
0
0
1
1
1
1
0
1
1
1
0
1
0
1
1
1
1
0
1
0
1
0
1
0
5 RBI 8 1 X 1 0 0 0 1 1 1 1 1 1 1 1
4 BI/RBO 9 1 X 1 0 0 1 1 1 1 1 0 0 1 1
220 10 1 X 1 0 1 0 1 0 0 0 1 1 0 1
3 LT g
g 14 11 1 X 1 0 1 1 1 0 0 1 1 0 0 1
6 7 f 15 f 12
13
1
1
X
X
1
1
1
1
0
0
0
1
1
1
0
1
1
0
0
0
0
1
0
0
1
1
1
1
D 9 e
2
C
4 e
d 10 d 14 1 X 1 1 1 0 1 0 0 0 1 1 1 1
15 1 X 1 1 1 1 1 0 0 0 0 0 0 0
1
B 4 c 11 c
BI X X X X X X 0 0 0 0 0 0 0 0 B
12 b
7
A 7 b
a 13 a
RBI
LT
1
0
0
X
0
X
0
X
0
X
0
X
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
C
D
CC
NOTES:
(A) BI/RBO is wire-AND logic serving as blanking Input (BI) and/or ripple-blanking output (RBO). The blanking out (BI) must be open or held
at a HIGH level when output functions 0 through 15 are desired, and ripple-blanking input (RBI) must be open or at a HIGH level if blanking
of a decimal 0 is not desired. X = input may be HIGH or LOW.
(B) When a LOW level is applied to the blanking input (forced condition) all segment outputs go to a LOW level regardless of the state of
any other input condition.
(C) When ripple-blanking input (RBI) and inputs A, B, C, and D are at LOW level, with the lamp test input at HIGH level, all segment outputs
go to a HIGH level and the ripple-blanking output (RBO) goes to a LOW level (response condition).
(D) When the blanking input/ripple-blanking output (BI/RBO) is open or held at a HIGH level, and a LOW level is applied to lamp test input, all segment
outputs go to a LOW level.
TERIMA KASIH
SN54/74LS00 SN54/74LS02 SN54/74LS04
QUAD 2-INPUT NAND GATE QUAD 2-INPUT NOR GATE HEX INVERTER