Design a combinational circuit that accepts a 2-bit number and generates an output binary number equal to the square of the input number.
Design a combinational circuit that accepts a 2-bit number and generates an output binary number equal to the square of the input number.
SIMULATION RTL ANALYSIS
VERILOG CODE
module obj3exp_5( input A,B, output W,X,Y,Z );
assign W=(A&B);
assign X=(A&!B);
assign Y=0;
assign Z=B;
endmodule
TESTBENCH CODE
module obj3exp_5_tb();
reg A,B;
wire W,X,Y,Z;
obj3exp_5 tab(A,B,W,X,Y,Z);
initial begin
A=0;B=0;
#100
A=0;B=1;
#100
A=1;B=0;
#100
A=1;B=1;
#100
$stop;
end
endmodule
- Design a combinational circuit that accepts a 2-bit number and generates an output binary number equal to the square of the input number.
- Design a combinational circuit with four inputs and four outputs that converts a 4bit binary number into the equivalent 4bit Gray code.
- Design a combinational circuit with four input lines that represent a decimal digit in BCD and four output lines that generate the 9’s complement of the input digit.
Related Posts
- Design a combinational circuit with four inputs and four outputs that converts a 4bit binary number into the equivalent 4bit Gray code.
- Design a combinational circuit that accepts a 2-bit number and generates an output binary number equal to the square of the input number.
- Design a combinational circuit with four input lines that represent a decimal digit in BCD and four output lines that generate the 9’s complement of the input digit.
Post a Comment
Post a Comment