In a ternary number system there arethree digits : 0, 1, and 2. The figure shown below defines aternary half-adder. Design a circuit that implements thishalf-adder using binary-encoded signals, such that two bits areused for each ternary digit. Let A= and B=, and Sum=; note that Carry is just a binary signal. Use the following encoding: 00=, 01=, and 10=. Minimize the cost of the circuit.