module Rip4(sum_o, cout, a_i, b_i, cin);
 //sub module for 4 bit Ripple carry adder
    input [3:0]a_i;
    input [3:0]b_i;
    input cin;
    output cout;
    output [3:0]sum_o;
    wire c2, c3, c4, cout;
    Fa m1(sum_o[0], c2, a_i[0], b_i[0], cin);
    Fa m2(sum_o[1], c3, a_i[1], b_i[1], c2);
    Fa m3(sum_o[2], c4, a_i[2], b_i[2], c3);
    Fa m4(sum_o[3], cout, a_i[3], b_i[3], c4);
endmodule