entity halfadder is port ( X: in bit; y: in bit; sum: out bit; cout: out bit ); end halfadder; architecture behavioural of halfadder is begin sum <= x xor y; cout <= x and y; end behavioural;