Construct a combinational circuit that has a 4-bit 8421 BCD digit as its input and generates the corresponding 4-bit gray code BCD digital output. The circuit also has a single bit output V. If the 4-bit input is not a valid 8421 BCD digit, V = 0; else V = 1. If V = 0, (the input is not valid) the gray code BCD outputs are don't cares.