You are on page 1of 16

VIVEKANAND EDUCATION SOCIETY’S

INSTITUTE OF TECHNOLOGY

Department of Computer Engineering

Computer Organization And Architecture (COA)


Mini Project Report on
Priority Encoder

By
Ajay Singh Khalsa(D7C-29)
Khushi Makhijani(D7C-38)
Ayush Raj Singh(D7C-60)

Supervisor:
Mrs. Prerna Solanke
TITLE: Implementation of 8:3 Priority Encoder.

SOFTWARE USED: Simulator.

COMPONENTS USED: 8 bit switches, 11 digital display, 8 NOT gates, 6 OR


gates, 6 NAND gates, 6 AND gates, Connecting wires.

ABSTRACT:
The basic working of a logic gate is to accept an input and display an output.
More advanced logic gates are then created by using multiple basic gates(AND,
OR, NOT etc). This implementation therefore allows one to create a logic gate
with multiple inputs and outputs, with different relations between the  former
and the latter.
In some cases, one or more of the inputs has a bigger influence on the nature of
the output. A need therefore arises to create a logic circuit that gives the
appropriate priority to each input. The priority encoder does exactly that, by
channelling the bit value of its most important bit.

CONTENTS:
I. Introduction
II. Objective
III.Theory
i. Encoder
ii. Advantages and Disadvantages of an Encoder
iii. Priority Encoder (8:3 Priority encoder)
IV. Logic Diagram
V. Truth table
i. Outputs
VI. Applications of Priority Encoder
VII. Implementation
VIII. Conclusion
IX. References
INTRODUCTION:

OBJECTIVE:
In this project, the working and implementation of the 8:3 priority encoder will
be studied in detail.

THEORY:

PRIORITY ENCODER
ENCODER:
A simple encoder or simply an encoder in digital electronics is a one-hot to
binary converter. That is, if there are 2n input lines, and at most only one of
them will ever be high, the binary code of this 'hot' line is produced on the n-bit
output lines.
For example, a 4-to-2 simple encoder takes 4 input bits and produces 2 output
bits.
An encoder is a combinational circuit that performs the inverse operation of a
decoder. If a device output code has fewer bits than the input code has, the
device is usually called an encoder.
e.g. 2n-to-n, priority encoders.
For example, a 4-to-2 simple encoder takes 4 input bits and produces 2 output
bits.

Advantages of an Encoder
- Highly reliable and accurate
- Low-cost feedback
- High resolution
- Integrated electronics
- Fuses optical and digital technology
- Can be incorporated into existing applications
- Compact size

Disadvantages of an Encoder
- Subject to magnetic or radio interference (Magnetic Encoders)
- Direct light source interference (Optical Encoders)
- Susceptible to dirt, oil and dust contaminates

PRIORITY ENCODER:
A priority encoder is a circuit or algorithm that compresses multiple binary
inputs into a smaller number of outputs. The output of a priority encoder is the
binary representation of the original number starting from zero of the most
significant input bit.

PRIORITY:
The term priority means if more than one inputs are made HIGH simultaneously
then the code of the selected input of highest priority is generated at output.
The Priority Encoder allocates a priority level to each input. The priority
encoders output corresponds to the currently active input which has the highest
priority.
So when an input with a higher priority is present, all other inputs with a lower
priority will be ignored.
8 TO 3 PRIORITY ENCODER
Priority encoders are available in standard IC form and the TTL 74LS148 is an
8-to-3 bit priority encoder which has eight active LOW (logic “0”) inputs and
provides a 3-bit code of the highest ranked input at its output.
This circuit has 8 inputs and 3 outputs. The inputs are assigned in increasing
priorities according to the increasing index of the input.
Input 7 has the highest priority and input 0 has the lowest. The 3 outputs carry
the index of the highest priority active input.
8 to 3 priority encoders output the highest order input first for example, if input
lines “D2“, “D3” and “D5” are applied simultaneously the output code would
be for input “D5” (“101”) as this has the highest order out of the 3 inputs.
Once input “D5” had been removed the next highest output code would be for
input
“D3” (“011”), and so on.
LOGIC DIAGRAM:

TRUTH TABLE:

Where X equals “don’t care”, that is logic “0” or a logic “1”.


From this truth table, the Boolean expression for the encoder above with data
inputs D0 to D7 and outputs Q0, Q1, Q2 is given as:
Output Q0:-

Output Q1:-

Output Q2:-

Then the final Boolean expression for the priority encoder is defined as:
APPLICATIONS OF PRIORITY ENCODER:

Priority encoders can be used to reduce the number of wires needed in a


particular circuits or application that have multiple inputs.
Priority Encoders may include detecting interrupts in microprocessor
applications. Here the microprocessor uses interrupts to allow peripheral
devices such as the disk drive, scanner, mouse, or printer etc, to communicate
with it, but the microprocessor can only “talk” to one peripheral device at a time
so needs some way of knowing when a particular peripheral device wants to
communicate with it.
The processor does this by using “Interrupt Requests” or “IRQ” signals to
assign priority to all the peripheral devices to ensure that the most important
peripheral device is serviced first. The order of importance of the devices will
depend upon their connection to the priority encoder.
IMPLEMENTATION:
CONCLUSION:
From the in-depth analysis of logical circuits, as well as the detailed analysis
and implementation performed in this project, the interior make up and
applications of priority encoders have been understood.

REFERENCES:
https://www.electronics-tutorials.ws/combination/comb_4.html
https://en.wikipedia.org/wiki/Priority_encoder
http://noel.feld.cvut.cz/hw/st/1903.pdf

You might also like