Professional Documents
Culture Documents
Combinational Logic Circuits (Circuits Without A Memory)
Combinational Logic Circuits (Circuits Without A Memory)
COMBINATIONAL CIRCUITS
LOGIC CIRCUITS:
1. Combinational
2. Sequential
Combinational logic circuits (circuits without a memory):
Combinational switching networks whose outputs depend only
on the current inputs.
Sequential logic circuits (circuits with memory):
In this kind of network, the outputs depend on the current inputs
and the previous inputs. These networks employ storage elements
and logic gates. [Chapters 5 and 9]
COMBINATIONAL CIRCUITS
Most important standard combinational circuits are:
Adders
Subtractors
Comparators
Decoders
Encoders
Multiplexers
Available in ICs as MSI and used as
standard cells in complex VLSI (ASIC)
2
ANALYSIS OF COMBINATIONAL LOGIC
C B A + + =
ABC =
BC AC AB + + =
1 2
' T F =
2 3
T T + =
ANALYSIS OF COMBINATIONAL LOGIC
ABC C AB C B A BC A
ABC C B BC AC AB C B A
ABC C B A C B C A B A
ABC C B A BC AC AB
ABC T F T T F
+ + + =
+ + + + + =
+ + + + + + =
+ + + + + =
+ = + =
' ' ' ' ' '
) ' ' ' ' )( ' ' ' (
) )( ' ' )( ' ' )( ' ' (
) ( )' (
'
1 2 2 3 1
BC AC AB F + + =
2
3
Inputs Outputs
A B C F
1
F
2
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
INPUTS OUTPUTS
ANALYSIS OF COMBINATIONAL LOGIC
From the truth table can you tell the function of the circuit?
//Example 4-10
//------------------------------------------
//Gate-level description of combinational circuit
module analysis (A,B,C,F1,F2);
input A,B,C;
output F1,F2;
wire T1,T2,T3,F2not,E1,E2,E3;
or g1 (T1,A,B,C);
and g2 (T2,A,B,C);
and g3 (E1,A,B);
and g4 (E2,A,C);
and g5 (E3,B,C);
or g6 (F2,E1,E2,E3);
not g7 (F2not,F2);
and g8 (T3,T1,F2not);
or g9 (F1,T2,T3);
endmodule
COMBINATIONAL LOGIC - Verilog CODE
4
COMBINATIONAL LOGIC - Verilog CODE
//Stimulus to analyze the circuit
module test_circuit;
reg [2:0]D; *input specified with a 3-bit reg vector D: 02
wire F1,F2; *outputs
analysis circuit(D[2],D[1],D[0],F1,F2); *D[2]=A, D[1]=B, D[0]=C
initial
begin
D = 3'b000; *D is a 3-bit vector initialized to 000
repeat(7) *The repeat loop gives the 7 binary numbers after 000
#10 D = D + 1'b1; *D is incremented by 1 after 10 ns
end
initial
$monitor ("ABC = %b F1 = %b F2 =%b ",D, F1, F2); *Display truth table
endmodule
Simulation Log:
ABC = 000 F1 = 0 F2 = 0
ABC = 001 F1 = 1 F2 = 0
ABC = 010 F1 = 1 F2 = 0