module adder_8bit (
    input [7:0] a,
    input [7:0] b,
    input cin,
    output [7:0] sum,
    output cout
);
    // Internal wires for carry propagation
    wire carry_internal;
    
    // Lower 8 bits addition
    assign {carry_internal, sum[7:0]} = a[7:0] + b[7:0] + cin;
    
    // Carry-out is the MSB of the 9-bit result
    assign cout = carry_internal;

endmodule