# Half Adder Logic and A B : not or not A not B xor A B : or and A not B and not A B input : A B C : and A B S : xor A B out : C S