Lab Report Encoders and Decoders
Lab Report Encoders and Decoders
EXPERIMENT NO 9
Ability to Conduct
Experiment
Data presentation
Experimental results
Conclusion
Objectves:
Equipment required:
⮚ ICs as required
Background Knowledge:
Decoder:
In digital electronics, a decoder can take the form of a multple-input, multple-output logic circuit that
converts coded inputs into coded outputs, where the input and output codes are different e.g. n-to-2n ,
binary-coded decimal decoders. Decoding is necessary in applicatons such as data multplexing, 7
segment display and memory address decoding.
Encoder:
An encoder is a device, circuit, transducer, soſtware program, algorithm or person that converts
informaton from one format or code to another.
Task 1:
Steps:
Truth
Table
A B D D D D
0 1 2 3
0 0 1 0 0 0
2
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Equatons:
ꢀ 0= ꢀ . ꢂ
ꢀ 1= ꢀ . ꢂ
ꢀ 2= ꢀ . ꢂ
ꢀ 3= ꢀ . ꢂ
Simulaton Results:
3
Img 1-3 Img 1-4
4
Task 2:
Steps:
1. Complete the truth table given below for an encoder.
2. Write the logic equatons formed.
3. Patch the equatons on the trainer accordingly.
Truth
Table
D0 D1 D2 D A B
3
1 0 0 0 0 0
0 1 0 0 0 1
0 0 1 0 1 0
0 0 0 1 1 1
Equatons:
ꢀ =ꢀ
2 +ꢀ 3 ꢂ= ꢀ 1+ ꢀ 3
Simulaton Results:
5
Img 2-3
6
Task 3:
Consider the following diagram, which means if we connect a decoder and an encoder (of same order)
in series we should get back our input.
Connect the above designed decoder and encoder in series and verify the results.
Truth Table:
A B D0 D1 D2 D3 A B
0 0 1 0 0 0 0 0
0 1 0 1 0 0 0 1
1 0 0 0 1 0 1 0
1 1 0 0 0 1 1 1
Simulaton Results:
7
Img 3-3
Img 3-4
8
Task 4:
Implement task 3 on your PC using Verilog. Write RTL code for Circuit and Test bench for
simulaton.
9
Simulaton Results:
Conclusion:
To have a basic understanding of decoders and encoders. To
experimentally verify the operation of decoder and encoder.
10