Latest Post

VLSI: Half Subtractor and Full Subtractor Gate Level Modelling

Half Subtractor:

Verilog Module Code:

module half_subtractor(
    input a,
    input b,
    output diff 
    output borr);
wire x;
xor (diff,a,b);
not (x,a);
and (borr,x,b);
endmodule

Full Subtractor:

Verilog Module Code:

module full_subtractor(
    input a,
    input b,
    input c,
    output diff 
    output borr);
wire x,n2,z,n1;
xor s1(x,a,b);
not s3(n2,x);
not s4(n1,c);
and s5(y,n1,b);
xor s2(diff,a,x);
and s6(z,n2,a);
or (borr,y,z);

endmodule

Popular posts from this blog

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

VLSI: 4-1 MUX Dataflow Modelling with Testbench

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

Verilog: 8 to 1 Multiplexer (8-1 MUX) Dataflow Modelling with Testbench Code