Consider each bit individually. For each bit there are 3 inputs (X,Y,Ci) and 2 outputs (S,Co). The carry gets carried to the next significant bit, Carry Out (Co) becomes Carry In (Ci) for the next digit.
You example is wrong. X=0101(5) + Y=1000(8) = S=1101(13) and C=0000
A better example is X=0111(7) + Y=0110(6) = S=1101(13) and C=0110
To get the next digit of the answer you add the X and Y bits and the carry bit from the previous bit addition. Adding 2 bits can result in an answer from 00 to 11(3) - the left bit is the carry the right is the output.
Mike.