# Code to add two 4bit numbers in verilog doesn't work

I have a code that adds two 4 bit numbers; unfortunately it is not working for every case even though the formulas are really simple and I don't find the problem...

module part2(SW, LEDG, LEDR);

input [17:0] SW;
output [17:0] LEDR;
output [4:0] LEDG;

//Red lights for each one
assign LEDR[17:0] = SW[17:0];

wire carry[2:0];

//Add the first digits of A and B
full_adder F0(SW, SW, SW, LEDG, carry);
//Add the second digits of A and B
full_adder F1(SW, SW, carry, LEDG, carry);
//Add the third digits of A and B
full_adder F2(SW, SW, carry, LEDG, carry);
//Add the last digits of A and B
full_adder F3(SW, SW, carry, LEDG, LEDG);

endmodule

module full_adder(A, B, CI, S, CO);

input A, B, CI;
output S, CO;

//Sum
assign S = A ^ B ^ CI;

//Carry out
assign CO = (A & B) | (CI & A) | (CI & B);

endmodule


It seems to work for most cases but look what happens with 1 and 10: full_adder F1(SW, SW, carry, LEDG, carry);


full_adder F1(SW, SW, carry, LEDG, carry);

assign LEDG = {1'b0,SW[7:4]} + {1'b0,SW[3:0]};