Intel Corporation interview question

Draw the circuit base on the coding provided