DCF-Module3
DCF-Module3
Important topics
• Gray to binary circuit
• half adder and full adder circuits
• parallel adder-subtractor circuit
• 2-bit Magnitude Comparator,
• Decoder,Encoder, priority encoder,
• two-to-one-line multiplexer
Previous carry The previous carry is not used. The previous carry is used.
The generated output is of two bits-Sum and The generated output is of two bits-Sum and Carry
Outputs
Carry from the input of 2 bits. from the input of 3 bits.
Logical Logical Expression for half adder is : Logical Expression for Full adder is :
Expression S=a⊕b ; C=a*b. S=a⊕b⊕Cin; Cout=(a*b)+(Cin*(a⊕b)).
It consists of one EX-OR gate and one It consists of two EX-OR, two AND gates, and
Logic gates
AND gate. one OR gate.
✓Circuit consists of two inputs one for A and the other for B and have three output
terminals, one for A > B condition, one for A = B condition, and one for A < B
condition.
2: 1 Multiplexer
• A 2-to-1 multiplexer consists of two inputs A0 and A1, one select input S and one output Y.
• Depending on the select signal, the output is connected to either of the inputs.
• As an example, let’s consider Octal to Binary encoder. As shown in the following figure, an octal-
to-binary encoder takes 8 input lines and generates 3 output lines.
A1=Y3+Y2
A0=Y3+Y1
ANIMOL K E -- GWPC NEDUPUZHA 30
✓ One of the main disadvantages of standard digital encoders is that they can generate the
wrong output code when there is more than one input present at logic level “1”.
✓ For example, if we make inputs Y1 and Y2 HIGH at logic “1” both at the same time, the
resulting output is neither at “01” or at “10” but will be at “11” which is an output binary
number that is different to the actual input present.
✓ Also, an output code of all logic “0”s can be generated when all of its inputs are at “0”
OR when input Y0 is equal to one.
✓ Normal encoder will not work when more than one input to the encoder are high
✓ One simple way to overcome this problem is to “Prioritise” the level of each input pin.
✓ So if there is more than one input at logic level “1” at the same time, the actual output
code would only correspond to the input with the highest designated priority.
✓ Then this type of digital encoder is known commonly as a Priority Encoder or P-
ANIMOL K E -- GWPC NEDUPUZHA 31
encoder for short.
PRIORITY ENCODER
• The Priority Encoder solves the problems mentioned above by allocating 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.
Applications
• 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.
D3 D2 D1 D0 A B V A = D2D3’+D3
0 0 0 0 X X 0 B= D2’D1 + D3
V = D0 + D1 + D2 + D3
0 0 0 1 0 0 1
0 0 1 X 0 1 1
0 1 X X 1 0 1
1 X X X 1 1 1
ANIMOL K E -- GWPC NEDUPUZHA 33
DECODER
• Decoder is a combinational circuit that has ‘n’ input lines and maximum of
2n output lines.
• One of these outputs will be active High based on the combination of inputs
present, when the decoder is enabled.
• That means decoder detects a particular code. The outputs of the decoder
are nothing but the min terms of ‘n’ input variables lines when it is enabled
• At a time, only one input line is activated for simplicity. The produced 2N-
bit output code is equivalent to the binary information.
Y3=E.A1.A0
Y2=E.A1.A0'
Y1=E.A1'.A0
Y0=E.A1’. A0'