To start you will need to break your larger integers into individual bits. This will depend on the endianess of your system (whether numbers are stored most, or least significant bit first). An array of bit masks would help. Assuming big endian,
int bit[]={
1<<0, //least significant bit
1<<1,
1<<2,
1<<3
};
So then to get the first bit of a number you would do
leastSignificantBitOfA = A&bit[0];
From there you could either use some shared array to store outputs or maybe make a simple structure like:
struct fullAdderReturn{
int sum;
int carryOut;
}
struct fullAdderReturn oneBitAdder(int a, int b, int carryIn)
{
struct fullAdderReturn output;
output.sum = a&b;
output.carryOut = (a&b) | (a&carryIn) | (b&carryIn);
return output;
}
I put together a simple 2-bit ripple adder here http://ideone.com/NRoQMS hopefully it gives you some ideas .