Latest Post

Ads

VLSI: Half Subtractor - Full Subtractor Dataflow Modelling

Half Subtractor:

Verilog Module Code:

module half_subtractor(
    input a,
    input b,
    output diff 
    output borr);
assign diff = a ^ b ;
assign borr = ( (~ a) & b ) ;
endmodule

Full Subtractor:

Verilog Module Code:

module full_subtractor(
    input a,
    input b,
    input bin,
    output diff 
    output borr);
assign x = a ^ b ;
assign y = (~x) & bin ;
assign z = (~a) & b ;
assign diff = x ^ bin ;
assign borr = y | z ;
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