module Rip16(sum_o, cout, a_i, b_i, cin);
    //main module of 16 bit Ripple carry adder
    input [15:0]a_i;
    input [15:0]b_i;
    input cin;
    output cout;
    output [15:0]sum_o;
    wire c4, c8, c12, cout;
    Rip4 m1(sum_o[3:0], c4, a_i[3:0], b_i[3:0], cin);
    Rip4 m2(sum_o[7:4], c8, a_i[7:4], b_i[7:4], c4);
    Rip4 m3(sum_o[11:8], c12, a_i[11:8], b_i[11:8], c8);
    Rip4 m4(sum_o[15:12], cout, a_i[15:12], b_i[15:12], c12);
endmodule