0% found this document useful (0 votes)
42 views9 pages

PRIORITY ENCODER With FAULTS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views9 pages

PRIORITY ENCODER With FAULTS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction

In digital electronics, binary encoders are combinational logic circuits that integrate multiple
inputs, consider all input lines simultaneously, and convert them into a single encoded output. It
appears to be a disadvantage of the binary encoder. The n-bit digital encoder consists of 2n input
lines and n output lines. Priority encoders were developed based on the high priority inputs to
overcome the disadvantage of the binary encoder.

What is a Priority Encoder


It is a combinational logic circuit that comprises 2n input lines and n output lines and depicts the
high priority input between all the input lines. When multiple input lines are simultaneously
active, the highest priority input is considered first to produce output.
Binary encoders produce an incorrect output when more than one input line is highly active.
Priority encoder solves this problem. If greater than one input line is simultaneously active high
(1), this encoder (priority encoder) prioritizes each input level and assigns the priority level to
every input.
The output of this encoder corresponds to the highest priority input. Only the highest priority
input is assessed by ignoring all other input lines to get an output. This is a binary encoder or an
ordinary encoder with a priority function. Larger magnitude input or highest priority inputs are
encoded first instead of other input lines. Therefore, the obtained output is based on the priority
allocated to the inputs.
In many digital applications, these encoders select the highest priority input. This process of
input selection is called arbitration. For example, when multiple devices transmit data over
computer systems, this encoder enables the highest priority device and allows access to the
computer among other low priority devices.
These encoders are designed for four inputs and eight inputs. The 4-bit priority encoder contains
four inputs, two outputs, and one valid output. The 8-bit priority encoder includes eight inputs
and three outputs.
Encoders compress information from multiple lines into a smaller number of inputs

4x2 Priority Encoder


It has three outputs designated by X1, X2, and X3. Where, X1and X2 are the ordinary outputs
and X3 is the output that acts as a valid bit indicator. This third output X3 is set to 1 when one or
more inputs are equal to 1. In the case, when all the inputs to the encoder are equal to 0, there is
no any valid input, and thus the output X3 is set to 0. The other two outputs, i.e. X1 and X2 of
the encoder are not determined when X3 is equal to 0. Therefore, when, X3 is equal to 0, the
outputs X1 and X2 are specified as "don’t care conditions".
The truth table above shows the inputs D3, D2, D1, D0 and Outputs X1, X2 and valid bit
indicator 'X3'. Here D3 is the input with the highest priority, and D0 is the input with the lowest
priority.
If the input D3 having the highest priority irrespective of every input line is active high (1), then
the output in the 4-bit priority encoder is 11.
If the D3 input is active low and D2(the next highest priority irrespective of every input line) is
active high, the output is X2X1 = 10.
If the input D3 and D2 is active low, and D1(which has the next highest priority irrespective of
the remaining input line) is active high, the output will be X2X1 = 01

Circuit Design:

Having none of the Inputs be 1 we have X3 = 0 that means output is invalid


Having all be 1, D0 has the highest priority and so we have X1 = X2 = 0

Having D1 = D3 = 1 and D0 = D2 = 0, D1 has the highest priority and so we have the Output
X1= 0, X2 = 1.
Fault injection
Stuck-at faults:
Case1: S-A-1 fault at the one input of the OR gate shown below
Fault-free circuit:

Faulty circuit

S-A-1 fault at the OR gate. In order to propagate the fault to the output, we need to sensitize the
path, so we need to try to put the 2nd input of the OR gate to 0. The output of U5 is now 1. Now
in order propagate this fault, the AND gate 2nd input should be 1, so we need to put D3=0 so that
the inverter U4 gets 1 and so the fault propagates to the output X2. The test vector 0010 detects
the s-a-1 fault at the U5 OR gate.

This circuit is just to check the faulty circuit when D1=0.(whether the fault propagates or not)

Case:2
S-A-0 fault at the OR gate input

Fault-free circuit
Faulty circuit

For the S-A-0 fault to propagate to the output X2, we need to sensitize the path i.e., we need to
put the 2nd input of the OR gate as 0, and the 2 nd input of AND gate should be 1. So, the fault
propagates to the output X2. The test vector 0011 detects the s-a-0 fault at the U5 OR gate.
This circuit just to check the faulty circuit when D1=0

Case 3: Bridging fault


Fault-free circuit:
Faulty ciruit

Difference Between Encoder and Priority Encoder:

The main difference between encoder and priority encoder is- the encoder generates an error
output when more than one input is high. But they are used in applications compressing data.
Hence, priority encoders are introduced to overcome the issues of binary encoders.
The priority encoder generates the accurate output by considering the highest priority input
among the multiple input lines. These can handle the interrupt requests of a microprocessor by
detecting the highest priority interrupt.
If a circuit contains multiple inputs, then it is used to reduce the number of wires required during
designing.

Applications:

Some of the applications of priority encoder are,


 It is used to reduce the no. of wires and connections required for electronic circuit designing
that have multiple input lines. Example keypads and keyboards.
 Used in controlling the position in the ship’s navigation and robotics arm position.
 Used in the detection of highest priority input in various applications of microprocessor
interrupt controllers.
 Used to protect the entire network from hackers by transmitting the binary code over the
network.
 Used to encode the analog to digital converter’s output.
 Used in synchronization of the speed of motors in industries.
 Used robotic vehicles
 Used in applications of home automation systems with RF
 Used in hospitals for health monitoring systems
 Used in secure communication systems with RF technology to enable secret code.

You might also like