Binary addition on A
and B
and outputs it along with proper carry bit. I'm not sure how to implement the carry bit
A
and B
are 4 bit inputs
C
is 1 bit output that is used for the carry bit
module addop(C , O , A , B);
input [3:0] A;
input [3:0] B;
output [3:0] O;
output C;
assign C1 = A[0] + B[0];
assign C2 = A[0] + B[1];
endmodule