Mid_Lecture_6
Mid_Lecture_6
Combination Circuits-2
Prepared By: Asif Mahfuz
Decoder
• A n-to-2n decoder takes an n-bit input and produces
2n outputs.
• The n-bit inputs represent a binary number that .
.
determines which of the 2n outputs is uniquely true. .
• As the name suggest the job of the decoder is to .
n-bit
n-to-2n 2n
.
decode. .
Decoder .
• For instance, if you ask the guard of a building, which .
• Boolean expression:
𝐎𝟎 = 𝐈𝟏 + 𝐈𝟑 + 𝐈𝟓 + 𝐈𝟕
𝐎𝟏 = 𝐈𝟐 + 𝐈𝟑 + 𝐈𝟔 + 𝐈𝟕
𝐎𝟐 = 𝐈𝟒 + 𝐈𝟓 + 𝐈𝟔 + 𝐈𝟕
Priority Encoders
• We have designed the encoders for an
ideal scenario, where only 1 input is
active at time.
• However, in real world scenario, this
will always not be the case.
• Hence, we need some modifications to
be made.
• The solution to this problem is to
define priority amongst the inputs.
• The priority circuit will detect the
input with highest priority and output
that signal only to the binary encoder.
• The encoder will then encode the
received input.
• So lets us learn how to design a
priority circuit.
Designing the Priority Circuit
• We now know the purpose of the priority circuit.
• So how to design the priority circuit.
• First, we need to know the priority of the inputs. So for our designing example let the
priority be, I0>I1>I2>I3>I4>I5>I6>I7.
• Now, we need to have the truth table of the priority circuit.
Designing the Priority Circuit
Boolean Expression for the priority circuit: Now that we have assured the ideal scenario,
• 𝐇𝟎 = 𝐈𝟎 we can just use the same logic for the
• 𝐇𝟏 = 𝐈𝟏𝐈𝟎 encoder design.
• 𝐇𝟐 = 𝐈𝟐 𝐈𝟏 𝐈𝟎 • 𝐎𝟎 = 𝐈𝟏 + 𝐈𝟑 + 𝐈𝟓 + 𝐈𝟕
• 𝐇𝟑 = 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎 • 𝐎𝟏 = 𝐈𝟐 + 𝐈𝟑 + 𝐈𝟔 + 𝐈𝟕
• 𝐇𝟒 = 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎 • 𝐎𝟐 = 𝐈𝟒 + 𝐈𝟓 + 𝐈𝟔 + 𝐈𝟕
• 𝐇𝟓 = 𝐈𝟓 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟔 = 𝐈𝟔 𝐈𝟓 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟕 = 𝐈𝟕𝐈𝟔 𝐈𝟓 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
Designing the Priority Circuit
Boolean Expression for the priority circuit:
• 𝐇𝟎 = 𝐈𝟎
• 𝐇𝟏 = 𝐈𝟏𝐈𝟎
• 𝐇𝟐 = 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟑 = 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟒 = 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟓 = 𝐈𝟓 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟔 = 𝐈𝟔 𝐈𝟓 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎
• 𝐇𝟕 = 𝐈𝟕𝐈𝟔 𝐈𝟓 𝐈𝟒 𝐈𝟑 𝐈𝟐 𝐈𝟏 𝐈𝟎