2E6 Digital Problem Sheet 7 For all questions, in addition to specific gates mentioned, inverters may be used as required. 1. A logic circuit has three inputs X 2 X 1 X 0 representing an unsigned binary number. The output D is required to be 1 if the input number is divisible by 2 or by 3 (ie if the quotient is an integer). Determine the required logic and implement the circuit with just NAND gates (and additional inverters, if required) 2. A set of stairwell lights is controlled by the single output L of a logic circuit having inputs from three switches S 2 S1 S 0 . Assume that initially all switches are DOWN and the lights are OFF. The first person to change any one of the three switches to UP turns the lights ON. The next person to subsequently alter the position of any one of the three switches turns the lights OFF. The next person turns the lights ON, etc. Determine the required logic and implement using (a) NAND gates, and (b) Exclusive-OR gates. 3. A logic circuit has four inputs X 3 X 2 X 1 X 0 representing an unsigned binary integer. The single output P is required to be 1 if the input is a prime number (zero may be taken as not being prime). Determine the required logic and implement (a) as a two-level NAND architecture, and (b) as a multilevel NAND architecture. Compare your two designs from the point of view of complexity and speed using the base data from the course notes. 4. A four-input logic circuit is required to implement the Boolean function F (w, x, y, z) (5, 6, 7, 9,10,11,13,14,15) Determine the required logic and implement using (a) NAND gates, and (b) NOR gates. Which design would you recommend in practice? 5. A logic circuit has four inputs 𝑥4 𝑥3 𝑥2 𝑥1 and a single output 𝑥0 . The output is required to take a value such that the five-bit word 𝑥4 𝑥3 𝑥2 𝑥1 𝑥0 contains an odd number of 1’s. Determine the required logic and implement. Exclusive-OR/NOR gates may be used to simplify the logic.