Design a half adder that is a circuit that performs
the addition of two binary digits, a and b. It
outputs the sum and the output carry.
module halfadder(a, b, sum, carry);
input a, b;
output sum, carry;a and b are the two input
values.
sum is the least significant digit of
.
carry is the output carry, i.e., the most
significant digit of
.