Boolen algebra logic for the 2 bit adder:
F(a0, a1, b0, b1) : 2 bit adder, 3 bit output
0: XOR(a0,b0)
1: XOR(XOR(a1, b1),AND(a0, b0))
2: OR(AND(XOR(a1,b1),AND(a0,b0)),AND(a1,b1))
This 2 bit adder is a combination of a half adder and a full adder, the half adder is a 1 bit adder which gives the sum bit and the carry bit ,the full adder is a 1 bit adder which takes 2 inputs along with a carry bit and gives 2 bit output.
Conneting the half adder and a full adder gives you a 2 bit adder, in a similar way connecting 4 full adders can give you a 4bit adder.
This is how the first digital computers were made, the logic gates like the AND, OR, XOR gates can be made with a simple switch, traditionally we used bulbs/tubes for the switch. The ENIAC was made with these switches and is conisdered the first ever digital computer.