advertisement

Course: CS106 Digital Design Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H CS 106 Sheet #6 Exercises to be submitted are announced on your blackboard website (different for each sections) and they are due on Monday (7-4-2014) 7:30 A.M Student names Student IDs Section Objectives: Analysis of combinational circuits. Ability to design combinational circuits for different problems. 1 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H Part 1 ( Analysis of Combinational Circuits ) Exercise 1: Consider the combinational circuits shown below : a) Find the corresponding logic expression for F from the circuit. b) List the truth table of the 3 input variables. Then list the values of the output F in the table. Exercise 2: Obtain the simplified Boolean expression for output Q in terms of the input variables in the circuit below: 2 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H Exercise 3: Consider the combinational circuits shown below : a) Find the corresponding logic expression for F from the circuit. b) List the truth table of the 3 input variables. Then list the values of the output F in the table. Exercise 4: Consider the circuits’ diagrams below and for each diagram: a. Construct a detailed truth table. b. Write the Boolean expression that represents the diagram. c. Simplify the Boolean function and construct the truth table of the simplified function and draw its diagram. (note that the black dots are not complement) 3 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H Exercise 5: For the following circuit diagram a. Derive the expression of the function F. b. Derive the truth table for F. c. Express F as Sum of Minterms. d. Express F as Product of Maxterms. e. Can F be further simplified? f. If F can be more simplified, give the expression for the simplified form. Exercise 6: For the following circuit diagram 4 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H a. Derive the expression for the function F. b. Derive the truth table for F. c. Express F in both canonical forms. d. Implement F using only NAND gate. Part 2 ( Design of Combinational Circuits ) Exercise 7: we want to design a combinational circuit with 4 inputs and one output to detect prime numbers between 0-15. Where the output is 1 when the binary value of the inputs is a prime number and the output is 0 otherwise. a) Construct the truth table that defines the required relationship between inputs and output. ( Hint: determine the required number of inputs and outputs and assign a symbol to each one). b) Obtain the simplified Boolean functions for each output as a function of the input variables. c) Draw the logic diagram and verify the correctness of the design. 5 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H Exercise 8: we want to design a combinational circuit with three inputs and one output. Where The output is 1 when the binary value of the inputs is less than 3 and the output is 0 otherwise. a) Construct the truth table that defines the required relationship between inputs and output. (Hint: determine the required number of inputs and outputs and assign a symbol to each one). b) Obtain the simplified Boolean functions for each output as a function of the input variables. c) Draw the logic diagram and verify the correctness of the design. Exercise 9: we want to design a combinational circuit with three inputs and one output. Where The output is 1 when the binary value of the inputs is even and the output is 0 otherwise. a) Construct the truth table that defines the required relationship between inputs and output. ( Hint: first, determine the required number of inputs and outputs and assign a symbol to each). b) Obtain the simplified Boolean functions for each output as a function of the input variables. c) Draw the logic diagram and verify the correctness of the design. Exercise 10: we want to design a combinational circuit with three inputs and one output. Where The output is 1 when the binary value of the inputs is greater than 2 and less than 6 and the output is 0 otherwise. 6 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H a) Construct the truth table that defines the required relationship between inputs and output. ( Hint: first, determine the required number of inputs and outputs and assign a symbol to each). b) Obtain the simplified Boolean functions for each output as a function of the input variables. c) Draw the logic diagram and verify the correctness of the design. Exercise 11: We need to design a logic circuit to control an elevator door in a three-story building. The circuit has four inputs. M is a logic signal that indicates when the elevator is moving (M=1) or stopped (M=0). F1, F2, and F3 are floor indicator signals that are normally LOW, and they go HIGH only when the elevator is positioned a the level of that particular floor. For example, when the elevator is lined up level with the second floor, F2=1 and F1 = F3 = 0. The circuit output is the OPEN signal which is normally LOW and is to go HIGH when the elevator door is to be opened. Exercise 12: A committee of four people interviews applicants for a job. Each person in the committee votes either yes or no for each applicant a. Design a voting system that determines whether an applicant passes the interview or not. The applicant passes the interview if he/she receives at least three yes votes. b. Design a circuit that calculates the number of votes an applicant got. [Hint: use block diagrams. You may need a full adder, a half adder, and a 4-bit binary adder] 3. Design a combinational circuit with three inputs and one output where the output is 1 when the binary value of the inputs is less than 3 and greater than 6. The output is not specified for the binary value 3. Otherwise the output is zero. Exercise 13: 7 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H Design a combinational circuit with three inputs and three outputs. When the binary input is 0, 1, or 2, the binary output is two greater than the input. The binary output is one less than the input for the remaining binary inputs. Exercise 14: A car with two doors has a switch for each door. The light is illuminated when a door is opened. However, there is another switch inside the car that if is ON, the light will not be illuminated even doors are opened. Design the logic circuit to implement this system. Exercise 15: Design combinational circuits for a candy machine where all flavors of the candies are of the same price which is 15 SR. The money tray of the machine has a slot named A for 10 SR and three slots for 5 SR named B1, B2, and B3. a. The first circuit should determine whether the money entered in slots is enough for buying a candy or not. That is, if a kid put 10 SR in the first slot and 5 SR in second slot and nothing in the remaining slots (A=True, B1=True, B2=False, B3=False), then the money is enough since the total is 15 SR . However, if the slots were A= False, B1=False, B2=True, B3=False, then the money is not enough since the total is 5 SR. b. Now assume that the machine has a screen that shows how many SR should be returned. For example, if a kid put money in all slots, that means the total she/he put was 25 SR, so the machine should return 10 SR since all candies are of 15 SR. Another example if slots values were A= False, B1=False, B2=True, B3=False, the machine should returned 5 SR. [Hint: once you construct the truth table, you’ll notice that the machine may return either nothing, 5 SR, or 10 SR. Remember that the binary representation of 10 is 1010 which is a 4-bit number.] 8 Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences 2nd semester, 1435 H Exercise 16: What does the following diagram do if you know that the binary numbers are in the 2’s complement sign representation? 1 A3 FA 9 A2 1 FA A1 0 FA A0 1 FA 0