0% found this document useful (0 votes)
583 views10 pages

Lab Report Encoders and Decoders

The document describes an experiment to understand and test decoders and encoders. Students implemented a 2-to-4 line decoder and 4-to-2 line encoder using logic gates. They then connected the decoder and encoder in series and verified the input is reproduced, demonstrating their intended functions. Code was also written in Verilog and simulation results matched the expected truth table outputs.

Uploaded by

Owais Farooq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
583 views10 pages

Lab Report Encoders and Decoders

The document describes an experiment to understand and test decoders and encoders. Students implemented a 2-to-4 line decoder and 4-to-2 line encoder using logic gates. They then connected the decoder and encoder in series and verified the input is reproduced, demonstrating their intended functions. Code was also written in Verilog and simulation results matched the expected truth table outputs.

Uploaded by

Owais Farooq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

AIR UNIVERSITY

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

EXPERIMENT NO 9

Lab Title: Decoder and Encoder


Student Name: Owais Farooq, Afia Eman, Sareen Abbasi
Reg. No: 232566, 232557, 232532
Objective: To have a basic understanding of decoders and encoders. To
experimentally verify the operaton of decoder and encoder.
LAB ASSESSMENT:

Excellent Good Average Satisfactory Unsatisfactory


Attributes
(5) (4) (3) (2) (1)

Ability to Conduct
Experiment

Ability to assimilate the


results

Effective use of lab


equipment and follows
the lab safety rules

Total Marks: Obtained Marks:

LAB REPORT ASSESSMENT:

Excellent Good Average Satisfactory Unsatisfactory


Attributes
(5) (4) (3) (2) (1)

Data presentation

Experimental results

Conclusion

Total Marks: Obtained Marks:


EXPERIMENT 09
Decoder and Encoder

Objectves:

⮚ To have a basic understanding of decoders and encoders.

⮚ To experimentally verify the operaton of decoder and encoder.

Equipment required:

⮚ ICs as required

⮚ Digital Electronics Trainer

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:

Use basic gates to implement and design a 2 to 4 line decoder.

Steps:

1. Complete the truth table given below for a decoder


2. Write the logic equatons formed.
3. Patch the equatons on the trainer (do not UN patch the circuit, as it will be used later)

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:

Img 1-1 Img 1-2

3
Img 1-3 Img 1-4

4
Task 2:

Use basic gates to implement and design a 4 to 2 line encoder.

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:

Img 2-1 Img 3-2

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:

Img 3-1 Img 3-2

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.

Source Code Test bench

9
Simulaton Results:

Conclusion:
To have a basic understanding of decoders and encoders. To
experimentally verify the operation of decoder and encoder.

10

You might also like