Design a combinational circuit with four inputs A, B, C, D and four outputs x, y, z, w. When the input is 0,1,2, or 3, the output is one greater than the input. When the input is 4,5,6 or 7, the output is one less than the input, otherwise the input will be equal to the output.