Professional Documents
Culture Documents
ENGINEERING
W = A'.B'
Out0 W
B I0 Out1 X X = A.B'
A I1 Out2 Y Y = A'.B
Out3 Z
msb Z = A.B
Active-high outputs
A B W X Y Z
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
W = (A'.B')'
Out0 W
B I0 Out1 X X = (A.B')'
A I1 Out2 Y Y = (A'.B)'
Out3 Z
msb Z = (A.B)'
Active-low outputs
A B W X Y Z
0 0 0 1 1 1
0 1 1 0 1 1
1 0 1 1 0 1
1 1 1 1 1 0
msb
Out0 W
B I0
high-level Out1 X
enable A I1
Out2 Y
Out3 Z
Enable En
En A B W X Y Z
1 0 0 1 0 0 0
1 0 1 0 1 0 0
enabled
1 1 0 0 0 1 0
1 1 1 0 0 0 1
disabled 0 x x 0 0 0 0
Out0 W
B I0
low-level Out1 X
enable A I1
Out2 Y
Out3 Z
Enable En
En A B W X Y Z
0 0 0 1 0 0 0
0 0 1 0 1 0 0
enabled
0 1 0 0 0 1 0
0 1 1 0 0 0 1
disabled 1 x x 0 0 0 0
19
Decoders and Encoders 13th January 2023 19
3-8 line decoder (active-HIGH) (contd.)
• This decoder can be referred to in several
ways. It can be called a 3-line-to- 8-line decoder,
because it has three input lines and eight output
lines.
• It could also be called a binary-octal decoder or
converters because it takes a three bit binary
input code and activates the one of the eight
outputs corresponding to that code. It is also
referred to as a 1-of-8 decoder, because only 1
of the 8 outputs is activated at one time.
A0 O0
A1 O1
A2 O2
DECODER O3
O4
O5
O6
O7
D I0
C I1 Out0 Z
Out1 Y
B I2
A I3
A B C D Y Z
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
msb
Valid bit
• A low at any single input will produce the output binary code
corresponding to that input. For instance , a low at A3’ will produce
O2 =0, O1=1 and O0 =1, which is binary code for 3. Ao’ is not
connected to the logic gates because the encoder outputs always
be normally at 0000 when none of the inputs is LOW
Decoders and Encoders 13th January 2023 34
Design of 4-input Priority Encoder
( 4-line-to 2 line priority encoder)
• TstA priority encoder is an encoder that includes the priority
function
• If two or more inputs are equal to 1 at the same time, the
input having the highest priority will take precedence.
• Truth Table of a 4-input Priority Encoder:
Inputs Outputs
D0 D1 D2 D3 x y V
0 0 0 0 X X 0
1 0 0 0 0 0 1
X 1 0 0 0 1 1
X X 1 0 1 0 1
X X X 1 1 1 1
Decoders and Encoders 13th January 2023 35
Design of 4-input Priority Encoder
( 4-line-to 2 line priority encoder) (contd.)
• In addition to two outputs x, and y, the truth table has a third
output designated by V, which is a valid bit indicator that is
set 1 when one or more inputs are equal to 1. If all inputs
are 0, there is no valid input and V is equal to 0
• X’s in the output column indicate don’t care conditions, the
X’s in the input columns are useful for representing a truth
table in condensed form
• The higher the subscript number, the higher the priority of
the input. Input D3 has the highest priority, so regardless of
the values of the other inputs, when this input is 1, the
output for xy is 11 (binary 3)
n Binary 2n outputs
inputs Decoder
X Y F0 F1 F2 F3
0 0 1 0 0 0
0 1 0 1 0 0 F0 = X'Y'
1 0 0 0 1 0
1 1 0 0 0 1
F1 = X'Y
F0
X Y
X 2-to-4 F1
Y Decoder F2
F3
F6 = xyz'
F0
F1 F7 = xyz
X
F2
Y
3-to-8
F3
Z
Decoder F4
F5
F6
x y z
F7
3-to-8 0
Decoder 1 S
2
x S2 3
y S1 4
5 C
z S0 6
7
Binary
2n encoder n
. .
inputs . . outputs
. .
Inputs Outputs
I0 I1 I2 I3 I4 I5 I6 I7 y2 y1 y0 Idle
0 0 0 0 0 0 0 0 x x x 1
1 0 0 0 0 0 0 0 0 0 0 0
X 1 0 0 0 0 0 0 0 0 1 0
X X 1 0 0 0 0 0 0 1 0 0
X X X 1 0 0 0 0 0 1 1 0
X X X X 1 0 0 0 1 0 0 0
X X X X X 1 0 0 1 0 1 0
X X X X X X 1 0 1 1 0 0
X X X X X X X 1 1 1 1 0
Alarm Contoller
Signal Response
Machine 1
Machine n