See Boolean algebra
NAND gates are fastest
Binary arithmetic with logic gates, Binary arithmetic – Half adder — Full adder