// 32 bit Carry Look Ahead adder module adder_c (operand1, operand2, cin, result, cout); input [31:0] operand1, operand2; input cin; output [31:0] result; output cout; reg [31:0] carrychain; wire [31:0] g =operand1 & operand2; wire [31:0] p= operand1 ^ operand2; always @(operand1 or operand2 or cin) begin: carry_generation integer i; carrychain [0] =g[0] + (p[0] & cin); for (i=1; i<32; i=i+1) begin #0 carrychain[i] = g[i] + (p[i] & carrychain[i-1]); end end wire [32:0] shiftedcarry = {carrychain, cin} ; //compute the sum wire [31:0] result = p ^ shiftedcarry; //carryout wire cout =shiftedcarry [32]; endmodule