Posts

Showing posts with the label Half Adder

VLSI: Half Adder and Full Adder Gate Level Modelling

Image
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

VLSI: Half Adder-Full Adder Dataflow Modelling

Image
Half Adder: Verilog Module Code: module half_adder (      input  a,      input  b,      output  sum       output  carry ); assign  sum = a ^ b  ; assign  carry = a & b; endmodule Full Adder: Verilog Module Code: module full_adder (      input  a,      input  b,      input  cin,      output  sum       output  carry ); assign  x = a ^ b  ; assign  y = x & cin  ; assign  z = a & b  ; assign  sum = x ^ cin  ; assign  carry = y | z ; endmodule

Popular posts from this blog

Samir Palnitkar Solution Manual Free Download PDF of Verilog HDL

VLSI: 8-3 Encoder Dataflow Modelling with Testbench

VLSI: 4-1 MUX Dataflow Modelling with Testbench

Verilog: 4 - 2 Encoder Structural/Gate Level Modelling with Testbench

1 to 4 DEMUX (Demultiplexer) Verilog CodeStructural/Gate Level Modelling with Testbench