Design a combinational circuit to generate the parity bit for digits coded in BCD code. The circuit should also have an additional output that produces an error signal if a non-BCD digit is input to the circuit. Realize the circuit using NAND -NAND logic.