![decimal to bcd priority encoder decimal to bcd priority encoder](https://i.imgur.com/3c6Pwna.png)
Here D3 input is the highest priority input and D0 is the lowest priority input. D3įrom the above truth table, we can observe that D3, D2, D1, D0 are the inputs A and B are the outputs and V is the valid bit indicator. The truth table of a 4 to 2 priority encoder is shown below. In this case, the other 2 output lines are considered as don’t care conditions denoted by ‘X If the valid bit is equal to ‘0’, then all the inputs are ‘0’. The third output is ‘V’, which is considered as a valid but indicator and it is set to 1 when more than one input line is high or active (1). Since an encoder contains 2^n input lines and n output lines. This is also referred to as 4- bit priority, which consists of 4 inputs and 2 output lines.
#DECIMAL TO BCD PRIORITY ENCODER CODE#
The different properties of this type of encoder include cascading of n bits for priority encoding, encoding of highest priority inputs, code conversions, decimal to BCD conversion, to enable output line with active low when all the input lines are active high. The output expression are obtained as shown below,įrom these simplified expressions, the 8 to 3 priority encoder circuit diagram is drawn as illustrated with logic gates as shown in the figure below.Ĩ to 3 types are available in the standard IC 74LS148, which consists of 8 active low or logic 0 inputs and 3 active high or logic 1 output bits. Hence, the generated output is based on the priority assigned to the inputs. The input that has the larger magnitude or highest priority is encoded first rather than other input lines. This is a type of binary encoder or an ordinary encoder with a priority function. To obtain the output, only the input with the highest priority is considered by ignoring all other input lines. The output of this encoder corresponds to the input that has the highest priority. If more than one input line is active high(1) at the same time, then this encoder prioritizes every input level and allocates the priority level to each input. It is used to solve the issues in binary encoders, which generate wrong output when more than one input line is active high. When multiple input lines are active high at the same time, then the input that has the highest priority is considered first to generate the output. The priority encoder is a combinational logic circuit that contains 2^n input lines and n output lines and represents the highest priority input among all the input lines.