SlideShare a Scribd company logo
1 of 32
DECODER
&
ENCODER
Syed Hasan Saeed, Integral University,
Lucknow
1
Syed Hasan Saeed, Integral University,
Lucknow
2
DECODER
• Adecoder is a combinational circuit.
• A decoder accepts a set of inputs that represents a binary
number and activates only that output corresponding to the
input number.All other outputs remain inactive.
• Fig. 1 shows the block diagram of decoder with ‘N’inputs and
‘M’outputs.
• There are 2N possible input combinations, for each of these
input combination only one output will be HIGH (active) all
other outputs are LOW
• Some decoder have one or more ENABLE (E) inputs that are
used to control the operation of decoder.
BLOCK DIAGRAM OF DECODER
DECODER
Syed Hasan Saeed, Integral University,
Lucknow
3
A0
A1
A2
AN-1
.
.
.
.
N- Inputs M- Outputs
Only one output is High for
each input
.
.
.
.
B0
B1
B2
BM-1
Fig. 1
2 to 4 Line Decoder:
 Block diagram of 2 to 4 decoder is shown in fig. 2
 Aand B are the inputs. ( No. of inputs =2)
 No. of possible input combinations: 22=4
 No. of Outputs : 22=4, they are indicated by D0, D1, D2 and D3
 From the Truth Table it is clear that each output is “1” for only
specific combination of inputs.
A
Syed Hasan Saeed, Integral University,
Lucknow
4
B
0
D
D1
D2
3
2 X 4
Decoder
INPUTS OUTPUTS
A B D0 D1 D2 D3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Fig. 2
TRUTH TABLE
Inputs
D
Outputs
BOOLEAN EXPRESSION:
From Truth Table
D0 A B
D2 A B
LOGIC DIAGRAM:
D1  A B
D3  AB
A
A B
B
D0 AB
D1  A B
D2  A B
D3 A B
Syed Hasan Saeed, Integral University,
Lucknow
5
Fig. 3
3 to 8 Line Decoder:
 Block diagram of 3 to 8 decoder is shown in fig. 4
 A, B and C are the inputs. ( No. of inputs =3)
 No. of possible input combinations: 23=8
 No. of Outputs : 23=8, they are indicated by D0 to D7
 From the Truth Table it is clear that each output is “1” for only
specific combination of inputs.
3 X 8
Decoder
A
B
C
Syed Hasan Saeed, Integral University,
Lucknow
6
. D0
.
.
.
D7
Outputs
Fig. 4
Inputs
TRUTH TABLE FOR 3 X 8 DECODER:
INPUTS OUTPUTS
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0 D0  A BC
0 0 1 0 1 0 0 0 0 0 0 D1  A BC
0 1 0 0 0 1 0 0 0 0 0 D2  A BC
0 1 1 0 0 0 1 0 0 0 0 D3  A BC
1 0 0 0 0 0 0 1 0 0 0 D4  A BC
1 0 1 0 0 0 0 0 1 0 0 D5  A BC
1 1 0 0 0 0 0 0 0 1 0 D6  A BC
1 1 1 0 0 0 0 0 0 0 1 D7  A BC
Syed Hasan Saeed, Integral University,
Lucknow
7
LOGIC DIAGRAM OF 3 X 8 DECODER:
D0  A B C
D1  A B C
D2 A B C
D3 A B C
D4  A B C
D5  A B C
D6  A B C
D7  A B C
A B C
OUTPUTS
INPUTS
A B C
Syed Hasan Saeed, Integral University,
Lucknow
8
Fig. 5
Syed Hasan Saeed, Integral University,
Lucknow
9
EXPANSION OF DECODERS:
The number of lower order Decoder for implementing higher order
Decoder can be find as
No. of lower order required = m2/m1
Where, m1=No. of Outputs of lower order Decoder
m2=No. of Outputs of higher order Decoder
:
2 x 4 Decoder
2 x 4 Decoder
X
Y
E
D0
D1
D2
D3
D4
D5
D6
D7
OUTPUT
Syed Hasan Saeed, Integral University,
Lucknow
10
INPUT
Fig. 6
2
3
4
5
6
7
Example: Implement the following multiple output function using a suitable
Decoder.
f1(A, B, C) = ∑m(0,4,7)+ d(2,3)
f2 (A, B, C) =∑m (1,5,6)
f3 (A, B, C) =∑m (0,2,4,6)
Solution: f1 consists of don’t care conditions. So we consider them to be logic 1.
0
1
f1(A, B, C)
f2 (A, B, C)
f3 (A, B, C)
3
x
8
Decoder
A
B
Syed Hasan Saeed, Integral University,
Lucknow
11
C
INPUTS
Fig. 7
EXAMPLE: Implement the following Boolean function using suitable Decoder.
f1 (x,y,z)=∑m(1,5,7)
f2 (x,y,z)=∑m(0,3)
f3 (x,y,z)=∑m(2,4,5)
Solution:
X
Y
Z
E
3
X
8
Decoder
0
1
2
3
4
5
6
7
INPUTS
f1 (x,y,z)
f2 (x,y,z)
f3 (x,y,z)
Fig. 8
Syed Hasan Saeed, Integral University,
Lucknow
12
EXAMPLE: A combinational circuit is defined by the following
Boolean function. Design circuit with a Decoder and external gate.
F1 (x, y ,z )  x y z  x z
F2 (x, y,z)  x y z  x z
SOLUTION: STEP 1: Write the given function F1 in SOP form
F1(x, y,z)  x y z  (y  y ) x z
F1(x, y,z)  x y z  x y z  x y z
F1(x, y,z)  m (0,5,7)
F2 (x, y,z)  x y z  x z
F2 (x, y,z)  x y z  (y  y ) x z
F2 (x, y,z)  x y z  x y z  x y z
F2 (x, y,z)  m (1,3,6)
Syed Hasan Saeed, Integral University,
Lucknow
13
(UPTU, 2004-05)
Boolean Function using Decoder:
0
1
2
3
4
5
6
7
F1
F2
3 x 8
Decoder
X
Syed Hasan Saeed, Integral University,
Lucknow
14
Y
Z
Fig. 9
ENCODER
• An Encoder is a combinational logic circuit.
• It performs the inverse operation of Decoder.
• The opposite process of decoding is known as Encoding.
• An Encoder converts an active input signal into a coded output signal.
• Block diagram of Encoder is shown in Fig.10. It has ‘M’inputs and ‘N’outputs.
• An Encoder has ‘M’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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
‘M’
Inputs
‘N’
Outputs
Encoder
Syed Hasan Saeed, Integral University,
Lucknow
15
A0
A1
A2
AM-1
B0
B1
B2
BN-1
Fig. 10
Syed Hasan Saeed, Integral University,
Lucknow
16
• Encoders are used to translate the rotary or linear motion into a digital
signal.
• The difference between Decoder and Encoder is that Decoder has Binary
Code as an input while Encoder has Binary Code as an output.
• Encoder is an Electronics device that converts the analog signal to digital
signal such as BCD Code.
• Types of Encoders
i. Priority Encoder
ii. Decimal to BCD Encoder
iii. Octal to Binary Encoder
iv. Hexadecimal to Binary Encoder
ENCODER
Encoder
4 x 2
Decoder
2 x 4
A0
A1
A2
A3
Fig. 11
Syed Hasan Saeed, Integral University,
Lucknow
18
M=4
M=22
M=2N
‘M’is the input and
‘N’is the output
B0
B1
B2
B3
ENCODER
Encoder
4 x 2
A0
A1
A2
A3
Decoder
2 x 4
M=4
M=22
M=2N
‘M’is the input and
‘N’is the output
Fig. 12
Syed Hasan Saeed, Integral University,
Lucknow
19
00
01
10
11
ENCODER
Encoder
4 x 2
A0
A1
A2
A3
Decoder
2 x 4
M=4
M=22
M=2N
‘M’is the input and
‘N’is the output
Fig. 13
20
00
01
10
11
1
0
ENCODER
Encoder
4 x 2
A0
A1
A2
A3
Decoder
2 x 4
M=4
M=22
M=2N
‘M’is the input and
‘N’is the output
Fig. 14
Syed Hasan Saeed, Integral University,
Lucknow
21
00
01
10
11
1
0 10
PRIORITY ENCODER:
• As the name indicates, the priority is given to inputs line.
• If two or more input lines are high at the same time i.e 1 at the same time,
then the input line with high priority shall be considered.
• Block diagram and Truth table of Priority Encoder are shown in fig.15
D3
D2
D1
D0
Y1
Y0
Highest Priority
Input
Priority
Encoder
21
Lowest Priority Output
Input
Block Diagram of Priority
Encoder
INPUTS OUTPUTS V
D3 D2 D1 D0 Y1 Y0
0 0 0 0 x x 0
0 0 0 1 0 0 1
0 0 1 x 0 1 1
0 1 x x 1 0 1
1 x x x 1 1 1
TRUTH TABLE:
Fig.15
X 0 0 0
1 1 1 1
1 1 1 1
1 1 1 1
00
01
11
10 10
11
01
00 X 0 1 1
0 0 0 0
1 1 1 1
1 1 1 1
D3D2
D3D2
D1D0
D1D0
00 01 11 10 00 01 11 10
2 1
3
0
Y  D  D D
• There are four inputs D0, D1,D2, D3 and two outputs Y1 and Y2.
• D3 has highest priority and D0 is at lowest priority.
• If D3=1 irrespective of other inputs then output Y1Y0=11.
• D3 is at highest priority so other inputs are considered as don’t care.
K-map for Y1 and Y0
Syed Hasan Saeed, Integral University,
Lucknow
22
Y1  D2  D3
Fig. 16
LOGIC DIAGRAM OF PRIORITY ENCODER:
Y1  D2  D3
Y0  D3  D2 D1
D3 D2 D1 D0
Y1
Y0
Syed Hasan Saeed, Integral University,
Lucknow
23
Fig. 17
DECIMAL TO BCD ENCODER:
• It has ten inputs corresponding to ten decimal digits (from 0 to 9)
and four outputs (A,B,C,D) representing the BCD.
• The block diagram is shown in fig.18 and Truth table in fig.19
-
-
-
-
-
-
-
-
-
Syed Hasan Saeed, Integral University,
Lucknow
24
ENCODER
C
0
1
2
9
INPUTS
A
B
D
OUTPUTS Fig. 18
Syed Hasan Saeed, Integral University,
Lucknow
25
Truth table:
INPUTS BCD OUTPUTS
0 1 2 3 4 5 6 7 8 9 A B C D
1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 0 0 0 1 0 0
0 0 0 0 0 1 0 0 0 0 0 1 0 1
0 0 0 0 0 0 1 0 0 0 0 1 1 0
0 0 0 0 0 0 0 1 0 0 0 1 1 1
0 0 0 0 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 1 0 0 1
Fig. 19
Syed Hasan Saeed, Integral University,
Lucknow
26
• From Truth Table it is clear that the outputAis HIGH when input is
8 OR 9 is HIGH
ThereforeA=8+9
• The output B is HIGH when 4 OR 5 OR 6 OR 7 is HIGH
Therefore B=4+5+6+7
• The output C is HIGH when 2 OR 3 OR 6 OR 7 is HIGH
Therefore C=2+3+6+7
• Similarly D=1+3+5+7+9
Logic Diagram is shown in fig.20
DECIMAL TO BCD ENCODER
+5V
0
1
2
3
4
5
6
7
8
9
A B C D Fig. 20
Syed Hasan Saeed, Integral University,
Lucknow
27
OCTAL TO BINARY ENCODER:
• Block Diagram of Octal to Binary Encoder is shown in Fig. 21
• It has eight inputs and three outputs.
• Only one input has one value at any given time.
• Each input corresponds to each octal digit and output
corresponding Binary Code.
generates
D0
D1
D2
D3
D4
D5
D6
D7
X
Syed Hasan Saeed, Integral University,
Lucknow
28
Y
Z
INPUT OUTPUT
ENCODER
Fig. 21
Syed Hasan Saeed, Integral University,
Lucknow
29
TRUTH TABLE:
INPUT OUTPUT
D0 D1 D2 D3 D4 D5 D6 D7 X Y Z
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
Fig.
22
Syed Hasan Saeed, Integral University,
Lucknow
30
From Truth table:
X  D4  D5  D6  D7
Y  D2  D3  D6  D7
Z  D1  D3  D5  D7
• It is assume that only one input is HIGH at any given time. If two outputs
are HIGH then undefined output will produced. For example D3 and D6
are HIGH, then output of Encoder will be 111. This output neither
equivalent code corresponding to D3 nor to D6.
• To overcome this problem, priorities should be assigned to each input.
• Form the truth table it is clear that the output X becomes 1 if any of the
digit D4 or D5 or D6 or D7 is 1.
• D0 is considered as don’t care because it is not shown in expression.
• If inputs are zero then output will be zero. Similarly if D0 is one, the
output will be zero.
•
X  D4  D5  D6  D7
Y  D2  D3  D6  D7
Z  D1  D3  D5  D7
D4 D5
Syed Hasan Saeed, Integral University,
Lucknow
31
LOGIC DIAGRAM:
D0 D1 D2 D3 D6 D7
X  D4  D5  D6  D7
Y  D2  D3  D6  D7
Z  D1  D3  D5  D7
Fig. 23
Syed Hasan Saeed, Integral University,
Lucknow
32
THANK YOU

More Related Content

Similar to encoderdecoder.pptx

combinational circuits dispositivos .ppt
combinational circuits dispositivos .pptcombinational circuits dispositivos .ppt
combinational circuits dispositivos .pptFilibertoMoralesGarc
 
combinational-circuit presenmtation .ppt
combinational-circuit presenmtation .pptcombinational-circuit presenmtation .ppt
combinational-circuit presenmtation .pptFilibertoMoralesGarc
 
combinational-circuit.ppt
combinational-circuit.pptcombinational-circuit.ppt
combinational-circuit.pptShivamRathod34
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).pptThanmayiKumar
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
combinational-circuit.pptx it tis creative study of digital electronics for ...
combinational-circuit.pptx it tis creative study of  digital electronics for ...combinational-circuit.pptx it tis creative study of  digital electronics for ...
combinational-circuit.pptx it tis creative study of digital electronics for ...RishabhSingh308993
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.pptSaranya S
 
Decoders and encoders
Decoders and encodersDecoders and encoders
Decoders and encoderssanket1996
 
Logic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.pptLogic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.pptAlbin562191
 
Digital electronics digital coders decoder encoder adder
Digital electronics digital coders decoder encoder adderDigital electronics digital coders decoder encoder adder
Digital electronics digital coders decoder encoder adderNilesh Bhaskarrao Bahadure
 
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxAishah928448
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
digital electronics..
digital electronics..digital electronics..
digital electronics..Saurav Roy
 
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Hsien-Hsin Sean Lee, Ph.D.
 
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptunit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptJ. Glory Precious
 

Similar to encoderdecoder.pptx (20)

combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
combinational circuits dispositivos .ppt
combinational circuits dispositivos .pptcombinational circuits dispositivos .ppt
combinational circuits dispositivos .ppt
 
combinational-circuit presenmtation .ppt
combinational-circuit presenmtation .pptcombinational-circuit presenmtation .ppt
combinational-circuit presenmtation .ppt
 
combinational-circuit.ppt
combinational-circuit.pptcombinational-circuit.ppt
combinational-circuit.ppt
 
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lcktB sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
combinational-circuit.pptx it tis creative study of digital electronics for ...
combinational-circuit.pptx it tis creative study of  digital electronics for ...combinational-circuit.pptx it tis creative study of  digital electronics for ...
combinational-circuit.pptx it tis creative study of digital electronics for ...
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
 
Decoders and encoders
Decoders and encodersDecoders and encoders
Decoders and encoders
 
Logic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.pptLogic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.ppt
 
Digital electronics digital coders decoder encoder adder
Digital electronics digital coders decoder encoder adderDigital electronics digital coders decoder encoder adder
Digital electronics digital coders decoder encoder adder
 
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
 
The decoder
The decoderThe decoder
The decoder
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Combinational Logic Circuits
Combinational Logic CircuitsCombinational Logic Circuits
Combinational Logic Circuits
 
digital electronics..
digital electronics..digital electronics..
digital electronics..
 
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
 
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptunit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
 
Decoder
DecoderDecoder
Decoder
 

More from AshwiniMate10

More from AshwiniMate10 (8)

Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Computer Architecture.pptx
Computer Architecture.pptxComputer Architecture.pptx
Computer Architecture.pptx
 
HOOVER PPT REVIEW PAPER (2) (1).pptx
HOOVER PPT REVIEW PAPER (2) (1).pptxHOOVER PPT REVIEW PAPER (2) (1).pptx
HOOVER PPT REVIEW PAPER (2) (1).pptx
 
class17A.ppt
class17A.pptclass17A.ppt
class17A.ppt
 
PHYS_3342_120111.ppt
PHYS_3342_120111.pptPHYS_3342_120111.ppt
PHYS_3342_120111.ppt
 
Kmaps.ppt
Kmaps.pptKmaps.ppt
Kmaps.ppt
 
DEN LAB 1.pptx
DEN LAB 1.pptxDEN LAB 1.pptx
DEN LAB 1.pptx
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 

Recently uploaded

Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdfKamal Acharya
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfEr.Sonali Nasikkar
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Toolssoginsider
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.benjamincojr
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfssuser5c9d4b1
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...drjose256
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..MaherOthman7
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfKira Dess
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 

Recently uploaded (20)

Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 

encoderdecoder.pptx

  • 1. DECODER & ENCODER Syed Hasan Saeed, Integral University, Lucknow 1
  • 2. Syed Hasan Saeed, Integral University, Lucknow 2 DECODER • Adecoder is a combinational circuit. • A decoder accepts a set of inputs that represents a binary number and activates only that output corresponding to the input number.All other outputs remain inactive. • Fig. 1 shows the block diagram of decoder with ‘N’inputs and ‘M’outputs. • There are 2N possible input combinations, for each of these input combination only one output will be HIGH (active) all other outputs are LOW • Some decoder have one or more ENABLE (E) inputs that are used to control the operation of decoder.
  • 3. BLOCK DIAGRAM OF DECODER DECODER Syed Hasan Saeed, Integral University, Lucknow 3 A0 A1 A2 AN-1 . . . . N- Inputs M- Outputs Only one output is High for each input . . . . B0 B1 B2 BM-1 Fig. 1
  • 4. 2 to 4 Line Decoder:  Block diagram of 2 to 4 decoder is shown in fig. 2  Aand B are the inputs. ( No. of inputs =2)  No. of possible input combinations: 22=4  No. of Outputs : 22=4, they are indicated by D0, D1, D2 and D3  From the Truth Table it is clear that each output is “1” for only specific combination of inputs. A Syed Hasan Saeed, Integral University, Lucknow 4 B 0 D D1 D2 3 2 X 4 Decoder INPUTS OUTPUTS A B D0 D1 D2 D3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 Fig. 2 TRUTH TABLE Inputs D Outputs
  • 5. BOOLEAN EXPRESSION: From Truth Table D0 A B D2 A B LOGIC DIAGRAM: D1  A B D3  AB A A B B D0 AB D1  A B D2  A B D3 A B Syed Hasan Saeed, Integral University, Lucknow 5 Fig. 3
  • 6. 3 to 8 Line Decoder:  Block diagram of 3 to 8 decoder is shown in fig. 4  A, B and C are the inputs. ( No. of inputs =3)  No. of possible input combinations: 23=8  No. of Outputs : 23=8, they are indicated by D0 to D7  From the Truth Table it is clear that each output is “1” for only specific combination of inputs. 3 X 8 Decoder A B C Syed Hasan Saeed, Integral University, Lucknow 6 . D0 . . . D7 Outputs Fig. 4 Inputs
  • 7. TRUTH TABLE FOR 3 X 8 DECODER: INPUTS OUTPUTS A B C D0 D1 D2 D3 D4 D5 D6 D7 0 0 0 1 0 0 0 0 0 0 0 D0  A BC 0 0 1 0 1 0 0 0 0 0 0 D1  A BC 0 1 0 0 0 1 0 0 0 0 0 D2  A BC 0 1 1 0 0 0 1 0 0 0 0 D3  A BC 1 0 0 0 0 0 0 1 0 0 0 D4  A BC 1 0 1 0 0 0 0 0 1 0 0 D5  A BC 1 1 0 0 0 0 0 0 0 1 0 D6  A BC 1 1 1 0 0 0 0 0 0 0 1 D7  A BC Syed Hasan Saeed, Integral University, Lucknow 7
  • 8. LOGIC DIAGRAM OF 3 X 8 DECODER: D0  A B C D1  A B C D2 A B C D3 A B C D4  A B C D5  A B C D6  A B C D7  A B C A B C OUTPUTS INPUTS A B C Syed Hasan Saeed, Integral University, Lucknow 8 Fig. 5
  • 9. Syed Hasan Saeed, Integral University, Lucknow 9 EXPANSION OF DECODERS: The number of lower order Decoder for implementing higher order Decoder can be find as No. of lower order required = m2/m1 Where, m1=No. of Outputs of lower order Decoder m2=No. of Outputs of higher order Decoder
  • 10. : 2 x 4 Decoder 2 x 4 Decoder X Y E D0 D1 D2 D3 D4 D5 D6 D7 OUTPUT Syed Hasan Saeed, Integral University, Lucknow 10 INPUT Fig. 6
  • 11. 2 3 4 5 6 7 Example: Implement the following multiple output function using a suitable Decoder. f1(A, B, C) = ∑m(0,4,7)+ d(2,3) f2 (A, B, C) =∑m (1,5,6) f3 (A, B, C) =∑m (0,2,4,6) Solution: f1 consists of don’t care conditions. So we consider them to be logic 1. 0 1 f1(A, B, C) f2 (A, B, C) f3 (A, B, C) 3 x 8 Decoder A B Syed Hasan Saeed, Integral University, Lucknow 11 C INPUTS Fig. 7
  • 12. EXAMPLE: Implement the following Boolean function using suitable Decoder. f1 (x,y,z)=∑m(1,5,7) f2 (x,y,z)=∑m(0,3) f3 (x,y,z)=∑m(2,4,5) Solution: X Y Z E 3 X 8 Decoder 0 1 2 3 4 5 6 7 INPUTS f1 (x,y,z) f2 (x,y,z) f3 (x,y,z) Fig. 8 Syed Hasan Saeed, Integral University, Lucknow 12
  • 13. EXAMPLE: A combinational circuit is defined by the following Boolean function. Design circuit with a Decoder and external gate. F1 (x, y ,z )  x y z  x z F2 (x, y,z)  x y z  x z SOLUTION: STEP 1: Write the given function F1 in SOP form F1(x, y,z)  x y z  (y  y ) x z F1(x, y,z)  x y z  x y z  x y z F1(x, y,z)  m (0,5,7) F2 (x, y,z)  x y z  x z F2 (x, y,z)  x y z  (y  y ) x z F2 (x, y,z)  x y z  x y z  x y z F2 (x, y,z)  m (1,3,6) Syed Hasan Saeed, Integral University, Lucknow 13 (UPTU, 2004-05)
  • 14. Boolean Function using Decoder: 0 1 2 3 4 5 6 7 F1 F2 3 x 8 Decoder X Syed Hasan Saeed, Integral University, Lucknow 14 Y Z Fig. 9
  • 15. ENCODER • An Encoder is a combinational logic circuit. • It performs the inverse operation of Decoder. • The opposite process of decoding is known as Encoding. • An Encoder converts an active input signal into a coded output signal. • Block diagram of Encoder is shown in Fig.10. It has ‘M’inputs and ‘N’outputs. • An Encoder has ‘M’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. - - - - - - - - - - - - - - ‘M’ Inputs ‘N’ Outputs Encoder Syed Hasan Saeed, Integral University, Lucknow 15 A0 A1 A2 AM-1 B0 B1 B2 BN-1 Fig. 10
  • 16. Syed Hasan Saeed, Integral University, Lucknow 16 • Encoders are used to translate the rotary or linear motion into a digital signal. • The difference between Decoder and Encoder is that Decoder has Binary Code as an input while Encoder has Binary Code as an output. • Encoder is an Electronics device that converts the analog signal to digital signal such as BCD Code. • Types of Encoders i. Priority Encoder ii. Decimal to BCD Encoder iii. Octal to Binary Encoder iv. Hexadecimal to Binary Encoder
  • 17. ENCODER Encoder 4 x 2 Decoder 2 x 4 A0 A1 A2 A3 Fig. 11 Syed Hasan Saeed, Integral University, Lucknow 18 M=4 M=22 M=2N ‘M’is the input and ‘N’is the output B0 B1 B2 B3
  • 18. ENCODER Encoder 4 x 2 A0 A1 A2 A3 Decoder 2 x 4 M=4 M=22 M=2N ‘M’is the input and ‘N’is the output Fig. 12 Syed Hasan Saeed, Integral University, Lucknow 19 00 01 10 11
  • 19. ENCODER Encoder 4 x 2 A0 A1 A2 A3 Decoder 2 x 4 M=4 M=22 M=2N ‘M’is the input and ‘N’is the output Fig. 13 20 00 01 10 11 1 0
  • 20. ENCODER Encoder 4 x 2 A0 A1 A2 A3 Decoder 2 x 4 M=4 M=22 M=2N ‘M’is the input and ‘N’is the output Fig. 14 Syed Hasan Saeed, Integral University, Lucknow 21 00 01 10 11 1 0 10
  • 21. PRIORITY ENCODER: • As the name indicates, the priority is given to inputs line. • If two or more input lines are high at the same time i.e 1 at the same time, then the input line with high priority shall be considered. • Block diagram and Truth table of Priority Encoder are shown in fig.15 D3 D2 D1 D0 Y1 Y0 Highest Priority Input Priority Encoder 21 Lowest Priority Output Input Block Diagram of Priority Encoder INPUTS OUTPUTS V D3 D2 D1 D0 Y1 Y0 0 0 0 0 x x 0 0 0 0 1 0 0 1 0 0 1 x 0 1 1 0 1 x x 1 0 1 1 x x x 1 1 1 TRUTH TABLE: Fig.15
  • 22. X 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 00 01 11 10 10 11 01 00 X 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 D3D2 D3D2 D1D0 D1D0 00 01 11 10 00 01 11 10 2 1 3 0 Y  D  D D • There are four inputs D0, D1,D2, D3 and two outputs Y1 and Y2. • D3 has highest priority and D0 is at lowest priority. • If D3=1 irrespective of other inputs then output Y1Y0=11. • D3 is at highest priority so other inputs are considered as don’t care. K-map for Y1 and Y0 Syed Hasan Saeed, Integral University, Lucknow 22 Y1  D2  D3 Fig. 16
  • 23. LOGIC DIAGRAM OF PRIORITY ENCODER: Y1  D2  D3 Y0  D3  D2 D1 D3 D2 D1 D0 Y1 Y0 Syed Hasan Saeed, Integral University, Lucknow 23 Fig. 17
  • 24. DECIMAL TO BCD ENCODER: • It has ten inputs corresponding to ten decimal digits (from 0 to 9) and four outputs (A,B,C,D) representing the BCD. • The block diagram is shown in fig.18 and Truth table in fig.19 - - - - - - - - - Syed Hasan Saeed, Integral University, Lucknow 24 ENCODER C 0 1 2 9 INPUTS A B D OUTPUTS Fig. 18
  • 25. Syed Hasan Saeed, Integral University, Lucknow 25 Truth table: INPUTS BCD OUTPUTS 0 1 2 3 4 5 6 7 8 9 A B C D 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 Fig. 19
  • 26. Syed Hasan Saeed, Integral University, Lucknow 26 • From Truth Table it is clear that the outputAis HIGH when input is 8 OR 9 is HIGH ThereforeA=8+9 • The output B is HIGH when 4 OR 5 OR 6 OR 7 is HIGH Therefore B=4+5+6+7 • The output C is HIGH when 2 OR 3 OR 6 OR 7 is HIGH Therefore C=2+3+6+7 • Similarly D=1+3+5+7+9 Logic Diagram is shown in fig.20
  • 27. DECIMAL TO BCD ENCODER +5V 0 1 2 3 4 5 6 7 8 9 A B C D Fig. 20 Syed Hasan Saeed, Integral University, Lucknow 27
  • 28. OCTAL TO BINARY ENCODER: • Block Diagram of Octal to Binary Encoder is shown in Fig. 21 • It has eight inputs and three outputs. • Only one input has one value at any given time. • Each input corresponds to each octal digit and output corresponding Binary Code. generates D0 D1 D2 D3 D4 D5 D6 D7 X Syed Hasan Saeed, Integral University, Lucknow 28 Y Z INPUT OUTPUT ENCODER Fig. 21
  • 29. Syed Hasan Saeed, Integral University, Lucknow 29 TRUTH TABLE: INPUT OUTPUT D0 D1 D2 D3 D4 D5 D6 D7 X Y Z 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 Fig. 22
  • 30. Syed Hasan Saeed, Integral University, Lucknow 30 From Truth table: X  D4  D5  D6  D7 Y  D2  D3  D6  D7 Z  D1  D3  D5  D7 • It is assume that only one input is HIGH at any given time. If two outputs are HIGH then undefined output will produced. For example D3 and D6 are HIGH, then output of Encoder will be 111. This output neither equivalent code corresponding to D3 nor to D6. • To overcome this problem, priorities should be assigned to each input. • Form the truth table it is clear that the output X becomes 1 if any of the digit D4 or D5 or D6 or D7 is 1. • D0 is considered as don’t care because it is not shown in expression. • If inputs are zero then output will be zero. Similarly if D0 is one, the output will be zero. •
  • 31. X  D4  D5  D6  D7 Y  D2  D3  D6  D7 Z  D1  D3  D5  D7 D4 D5 Syed Hasan Saeed, Integral University, Lucknow 31 LOGIC DIAGRAM: D0 D1 D2 D3 D6 D7 X  D4  D5  D6  D7 Y  D2  D3  D6  D7 Z  D1  D3  D5  D7 Fig. 23
  • 32. Syed Hasan Saeed, Integral University, Lucknow 32 THANK YOU