Latest Post

Ads

VLSI: Half Adder and Full Adder Gate Level Modelling

Half Adder:


module HalfAdder(
    input A,
    input B,
    output sum,
    output carry
    );
 
xor (sum,A,B);
and (carry,A,B);

endmodule



Full Adder:


module FullAdder(
    input A,
    input B,
    input Cin,
    output sum,
    output carry
    );

wire a1, a2, a3;   
xor g1(a1,A,B);
and g4(a2,A,B);
and g3(a3,a1,Cin);
or g5(carry,a2,a3);
xor g2(sum,a1,Cin);

endmodule

Ads

Popular posts from this blog

VLSI: BCD to Excess 3 and Excess 3 to BCD Dataflow Modelling

Full Subtractor Verilog Code in Structural/Gate Level Modelling with Testbench

VLSI: 1-4 DEMUX (Demultiplexer) Dataflow Modelling with Testbench

VLSI: 4-1 MUX Dataflow Modelling with Testbench

VLSI: Half Subtractor and Full Subtractor Gate Level Modelling