implements the gates in the full and half adder classes