Beruflich Dokumente
Kultur Dokumente
By
Assistant Professor
VIT University
• It can be designed connecting the full adders in cascade with the carry of each full adder
being connected to the input carry of the next full adder.
• Addition of ‘n’ bit requires ‘n’ full adders or 1 half adder and ‘n-1’ full adders
• M = 0 => Adder
• M = 1 => Subtractor
• “n” represents the number of inputs and “m” represents the number of outputs.
• “m ≤ 2n”. If there are any unused input combinations then the decoder may have less
than 2n outputs.
X1 X0 E Y0 Y1 Y2 Y3
X X 0 0 0 0 0
0 0 1 1 0 0 0
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 1
Y0 = EX1’X0’
Y1 = EX1’X0
Y0 = EX1X0’
Y0 = EX1X0
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 1 1 1 0 0 0 0DLD - Module
0 04 - Combinational
0 0 0
Circuits 0 0 0 0 0 0 1
Implementation of Full Adder using Decoder
F1(A, B, C) = Ʃ(1, 4, 6)
F2(A, B, C) = Ʃ(3, 5)
F3(A, B, C) = Ʃ(2, 4, 6, 7)
• An octal to binary encoder has 8 inputs and 3 outputs (assume only one input is high (1) at a
given time). • An octal to binary encoder (8:3
encoder) can be implemented using
three OR gates.
x = D4+D5+D6+D7
y = D2+D3+D6+D7
z = D1+D3+D5+D7
• If more than one input is active, the higher-order input has priority over the lower-
order input.
• Design a four-input priority encoder with input D1 having the highest priority, D0
having the next lower priority, D2 has the next lower priority and input D3 the
lowest priority. Write the corresponding Verilog HDL code.
• The bit combination of the selection line determines which input to be connected to the output
• First n-1 variables of the function is connected to the selection inputs of the multiplexer.
• F(A,B,C,D) = Ʃ(0,2,5,8,10,14)
• F(A,B,C,D) = ∏(2,6,11)
• A decoder with enable input can function as a de-multiplexer with the following considerations.
• The enable signal of the decoder can be considered as the data input of the de-multiplexer
Multiplier – 2 bit by 2 bit
• Magnitude comparators allow for data comparison and can be built using and-or gates
• The comparison of two numbers gives the outputs: A>B, A=B, A<B
• Design Approaches
2n
• Truth table : 2 entries - too cumbersome for large n
• use inherent regularity of the problem
• reduce design efforts
• reduce human errors
Block Diagram of Magnitude Comparator
4 A<B
A
Magnitude A=B
4 Comparator
B
A>B
Magnitude Comparison
Algorithm -> logic
A = A3A2A1A0 ; B = B3B2B1B0
(A=B) = x3x2x1x0
Implementation
xi = (AiBi'+Ai'Bi)’
Logic Circuit for Magnitude Comparison
(A=B) = x3x2x1x0
(A>B) = A3B3'+x3A2B2'+x3x2A1B1'+x3x2x1 A0B0‘
(A<B) = A3'B3+x3A2'B2+x3x2A1'B1+x3x2x1 A0'B0
Parity Generator
• A parity bit is an extra bit included with a binary message to make the number of 1’s
either odd or even.
• A circuit that generates the parity bit in the transmitter is called parity generator.
• It is very useful in systems requiring error detection and correction codes.