So you notice an advertisement in a campus newspaper seeking an ECE student for a part-time job workingin Psychology Professor Zapper?s laboratory, and you apply for and get the job! Professor Zapper assignsyou the task of building logic circuitry for the following experiment studying the learning ability of rats.The experimenter enters a number 0,1,2, or 3 on a keypad, which encodes the number as a two-bit unsignedinteger as the binary inputs A and B to your circuit; A corresponds to the most significant bit, and Bcorresponds to the least significant bit. The experiment cage has two levers, one each to which the left andright paws of the rat are strapped. The output of the levers, L and R respectively, which will also be inputsto your circuit, are 1 if depressed by the rat, and 0 otherwise.There are three lights in a row in the cage, corresponding to the input numbers 1, 2, and 3; call these F1, F2,and F3; the corresponding light should be on (output 1) only for the corresponding input number. There isalso an output Z, which when activated (Z = 1) gives the rat a mild electric shock. Professor Zapper wantsthe experiment to work as follows: When the experimenter?s input number is zero, the rat is never shocked(Z = 0), and all of the lights are off. When the input number is 1, the light F1 alone is activated, and therat receives a shock unless it depresses only the left lever. When the input number is 2, the light F2 aloneis activated, and the rat receives a shock unless it depresses only the right lever. When the input number is3, the light F3 alone is activated, and the rat receives a shock if it depresses either or both levers.A. Based on this description, design the desired truth table (inputs A, B, L, R) for the output Z.B. Use a Karnaugh map to reduce the logical expression for this function Z to the simplest form that youcan.C. Draw the complete logic schematic circuit diagram for your system, for inputs A, B, L, and R enteringon the left side, and outputs F1, F2, F3, and Z on the right side.