The sub-system has four binary inputs: A,B,C,D; and generates a 3-bit output: XYZ.
XYZ is 000 if none of the inputs are 1, 001 if one input is 1, 010 if two are one, 011 if three inputs are 1, and 100 if all four inputs are 1. Adopt the use of a 4-bit timing counter to produce the digital signal.