Encoder S
Encoder S
An encoder is a device whose inputs are decimal digits and/or alphabetic characters and whose
outputs are the coded representation of those inputs. An encoder has a number of input lines,
only one of which is activated at a given time and produces an N- bit output code depending on
which input is activated.
S-
⑧
𝐷0 0 0 0 0
⑳
Az
--
𝐷1 1 0 0 1
𝐷2 2 0 1 0
⑳
As
𝐷3 3 0 1 1
⑳
𝐷4 4 1 0 0
𝐷5 5 1 0 1 -
Ar
𝐷6 6 1 1 0
𝐷7 7 1 1 1
From the truth table, we see that 𝐴2 is 1 if any of the digit 𝐷4 or 𝐷5 or 𝐷6 or 𝐷7 is a 1. Therefore,
𝐴2 = 𝐷4 + 𝐷5 + 𝐷6 + 𝐷7
Similarly,
𝐴1 = 𝐷2 + 𝐷3 + 𝐷6 + 𝐷7
And
𝐴0 = 𝐷1 + 𝐷3 + 𝐷5 + 𝐷7
Binary
Octal Digits
𝑨𝟑 𝑨𝟐 𝑨𝟏 𝑨𝟎
𝐷0 0 0 0 0 0
𝐷1 1 0 0 0 1
𝐷2 2 0 0 1 0
𝐷3 3 0 0 1 1
𝐷4 4 0 1 0 0
𝐷5 5 0 1 0 1
𝐷6 6 0 1 1 0
𝐷7 7 0 1 1 1
𝐷8 8 1 0 0 0
𝐷9 9 1 0 0 1
From the truth table, we see that 𝐴3 is 1 if any of the digit 𝐷8 or 𝐷9 is 1. Therefore,
𝐴3 = 𝐷8 + 𝐷9
Similarly,
𝐴2 = 𝐷4 + 𝐷5 + 𝐷6 + 𝐷7
𝐴2 = 𝐷2 + 𝐷3 + 𝐷6 + 𝐷7
And
𝐴0 = 𝐷1 + 𝐷3 + 𝐷5 + 𝐷7 + 𝐷9
Priority Encoder
Input Output
𝑫𝟎 𝑫𝟏 𝑫𝟐 𝑫𝟑 𝒀𝟏 𝒀𝟎 X
0 0 0 0 × × 0
1 0 0 0 0 0 1
× 1 0 0 0 1 1
× × 1 0 1 0 1
× × × 1 1 1 1
00 01 11 10 00 01 11 10 00 01 11 10
00 × 1 1 1 00 × 1 1 00 1 1 1
01 1 1 1 01 1 1 1 01 1 1 1 1
11 1 1 1 11 1 1 1 11 1 1 1 1
10 1 1 1 10 1 1 10 1 1 1 1
𝑌1 = 𝐷2 + 𝐷3
𝑌0 = 𝐷3 + 𝐷1 ̅̅̅
𝐷2
𝑋 = 𝐷3 + 𝐷2 + 𝐷1 + 𝐷0