You are on page 1of 1

module Adder(

input A, B, Cin,
output sum, cout
;)
assign sum = A ^ (Cin^B) ^ Cin;
assign cout = (A&(B ^Cin))|(Cin&(A^(B^Cin)));
endmodule

You might also like