[Problem 3] (15%) 2-4-2-1 is a useful 4-bit binary code to represent decimal digits, as listed in Table 1. Design a combinational circuit F that can check if the decimal input encoded by 2-4-2-1 is a prime number, i.e., a positive integer that is greater than 1 and can be exactly divided by only 1 and itself. That is, the output F of the circuit equals 1 if and only if the decimal input is a prime number. You need to show the truth table of this circuit and design the two-level NAND-NAND network using the minimumn number of logic gates and literals. Please note that the input code words (w, x, y, z) and their complements can be used directly as fan-in in the final logic diagram, and the unused input code words can be used as don't care conditions for logic simplification.
