Due Date: 12pm Wed, 03May 2017 Software requirement: You must use the Logisim simulator to create your circuits. Assignments submitted using other programs will NOTBE ABLE TO BE MARKED due to incompatible file formats. Task Description: You are to build (and test) the following digital logic circuit in the Logisim simulator and write a short report that describes your circuit. . Labelling You must labeleach circuit and template that you construct with the Annotation tool and ensure that all the inputs are labelled as instructed in this sheet. Each circuit and template must be labelled with: 1. An appropriate label for each input 2. An appropriate label for each output 3. An appropriate label for the template that describes its function Note: Be careful, before submission, test if your circuit works as required. Testing You will need to test various possible combinations for the inputs C1-1, C1-2, C1-3, C2-1, C2-2 and C2-3 and check if the desired output is obtained (for Part A). You do not need to submit your tests. For Part B, you will also have to test the cases where game stops correctly after the player has won or lost. Report Your report (6 – 8 pages) must contain the following sections: 1. Your details: Name, student number, and email address 2. Circuit Function: A brief (100-200 words for each part) description of the function of each separate part of your circuit describing in your own words how that part of the circuit operates. This should be split up into sections that relate to the different components (templates/subcircuits) in the overall circuit. 3. Circuit diagrams: A diagram of your circuit including all templates/subcircuits and their contents. You must draw this diagram yourself using the Logisim logic simulator. To include a circuit in your report, please take a screen shot of the circuit and paste the screenshot into your report. Copying and pasting from the lecture notes or other sources is NOT permitted. 4. Truth table: Show all possible inputs and outputs for the card values showing for which combinations the game is won and for which the game is lost. The column headings in your truth table should correspond to the labels on your circuit diagram. Requirements: For this assignment you are required to implement a simple game for a single player. The game has two cards (C1 and C2) as inputs. Each card value is an octal digit (3 input bits, values 0..7). The two card values C1 and C2 are added together. If C1 + C2 < 7 the player wins. If C1 + C2 > 6 the player loses. Example 1: C1 is 2 and C2 is 7. The sum of the card values (C1 + C2) is 9. Since 9> 6, the player loses. Example 2: C1 is 3 and C2 is 2. The sum of the card values (C1 + C2) is 5. Since 5 <6 , the player wins. Example 3: C1 is 0 and C2 is 6. The sum of the card values (C1 + C2) is 6. Since 6< 7, the player wins. Note: These are just a couple of examples. There are (many) more cases that result in C1 + C2 < 7 (player wins) and C1 + C2 > 6 (player loses). Your circuit must correctly show a win or a loss for each possible case. For this assignment, Card 1 (C1) will be represented by three inputs (3 bits). The three C1 inputs are named as C1-1, C1-2, and C1-3. The table below shows the assignment of bits to each C1 value for C1-1, C1-2, and C1-3. C1 value C1-1 C1-2 C1-3 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 C1 Inputs For this assignment, Card 2 (C2) will be represented by three inputs (3 bits). The three C2 inputs are named as C2-1, C2-2, and C2-3. The table below shows the assignment of bits to each C2 value for C2-1, C2-2, and C2-3. C2 value C2-1 C2-2 C2-3 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 C2 Inputs Part A Circuit Option 1: Part A Only : The implementation for this part must use only the three basic logic gates (AND, OR, NOT) with maximum2 inputs. You are required to implement a circuit where the user (you) can input a value for Card 1 (C1) value (C1-1, C1-2, and C1-3) and a Card 2 (C2) value (C2-1, C2-2, and C2-3) and the circuit decodes the C1-1, C1-2, C1-3 and C2-1, C22, C2-3 values using a decoder (see lecture notes) as well as other permitted logic gates to determine if the C1 + C2 < 7. The output will be a single LED labelled WINNER which is lit if the C1 + C2 < 7, and is not lit if the C1 + C2 > 6. Part B Circuit Option 2: Part A and Part B : For this part, the player plays a number of games until a certain number (N) of wins or lossesis reached. The number Nranges from 1 to 7 and must be set via a combination of three separate inputs: N1, N2, and N3. An N value of 0 is not allowed and the game state is undefined for this case. This means that you will have to set N to be non-zero (1..7) before starting the game. Note: In Logisim, you can combine the 3 inputs for N into a single 3 bit input. Using the same circuit as Part A, add additional circuitry to count how many games have been won and lost. Each time a game is won, add 1 to the number of wins and reduce the number of losses by 1. Each time a game is lost, add 1 to the number of losses and reduce the number of wins by 1. If the number of wins, reaches N, the game is won completely and an OVERALL_WINNER LED is lit. If the number of losses, reachesN, the game is lost completely and an OVERALL_LOSER LED is lit. It is not possible to have both the OVERALL_WINNER and OVERALL_LOSER LEDs lit at the same time. It is however possible to have both OVERALL_WINNER and OVERALL_LOSER LEDs off at the same time. Overall winner: If the number of wins is equal to N (the total number of games that need to be won or lost) then an LED labelled OVERALL_WINNER is lit, and the circuit is permanently locked. No matter the changes to the input after this happens, the OVERALL_WINNER LED will stay lit and the OVERALL_LOSER LED will remain unlit. Overall loser: If the number of losses is equal to N (the total number of games that need to be won or lost) then an LED labelled OVERALL_LOSER is lit, and the circuit is permanently locked. No matter the changes to the input after this happens, the OVERALL_LOSER LED will stay lit and the OVERALL_WINNER LED will remain unlit. N N1 N2 N3 INVALID 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 Values for N1, N2, N3 For Part B only, you may use only the three basic logic gates (AND, OR, NOT) with maximum 2 inputs, as well as the more advanced counter, comparator, and DLATCH circuits (only those three) from the Logisim circuit library. Note: For Part B you will need to add a button that is pressed by you after the two card values (C1 and C2) have been entered. This is to avoid counting while you are adjusting the input pins for the C1 and C2 input pins (C1-1, C1-2, C13, C2-1, C2-2, and C2-3).