To set or clear the alarm, a 3-digit combination must be entered. Hidden away in the control box is a set of three 10-position switches (that contains the 3-digit alarm code). The switches each produce a 4-bit number, R1:4, S1:4, and T1:4. As one pushes the buttons to enter the alarm code, the first digit will appear on the keypad output for several clock periods, followed by a hexadecimal F (indicating that no key is pushed) for several more clock periods, followed by the second digit, and so on.We must design a system that watches the keypad and, if the right code is received, complements A. (Note: Like many alarms, the same code is used to arm the alarm, that is, put a 1 in A, as to disarm it.) Assume that there is at least one clock period when no key is pushed between digits. However, if another key is not depressed within 100 clocks, the system goes back to looking for the first digit.