Project 3
CS 345
Computer Organization
20 Points
Due Friday, Apr. 10, 2015 at 11:59:59 pm

Creating a logic circuit for calculator digits

Objective:  To learn about boolean algebra, logic gates, and JLS, and to learn a little bit about digital logic.

Specification:

For this project, you will create a circuit that will produce outputs capable of displaying single digit of a calculator.  You will create this circuit using JLS.  Notice that a calculator displays digits as follows:

 ---           ---    ---           ---    ---    ---    ---    ---
|   |      |      |      |  |   |  |      |          |  |   |  |   |
|   |      |      |      |  |   |  |      |          |  |   |  |   |
               ---    ---    ---    ---    ---           ---    ---
|   |      |  |          |      |      |  |   |      |  |   |      |
|   |      |  |          |      |      |  |   |      |  |   |      |
 ---           ---    ---           ---    ---           ---    ---

The parts of a digit on a calculator correspond to one of seven bars.  Notice that we will represent each of these bars with a number.  The bars may be turned on or off to represent a digit.  Hence with a real circuit we could send a signal (either a one or a zero) to turn a bar on or off.

    1
   ---
2 |   | 3
  | 4 |
   ---
  |   |
5 |   | 6
   ---
    7

On a real calculator numerical values will likely be provided in binary rather than decimal.  We can draw a truth table to represent values from zero to nine in binary and map each of these values to a set of bars.  Notice that the section of the truth table for zero has been left empty, excepting the value for output 1.  You must fill it in to complete the assignment.

For the remaining bars, notice that for an input value of one (0001), bars 3 and 6 should be turned on.  Thus, in the truth table, outputs for 3 and 6 are one, and the remaining outputs are zero.  You should check to make sure all the other outputs correspond to the correct bars.

Truth table

 A B C D   1 2 3 4 5 6 7
_________________________
 0 0 0 0   1
 0 0 0 1   0 0 1 0 0 1 0
 0 0 1 0   1 0 1 1 1 0 1
 0 0 1 1   1 0 1 1 0 1 1
 0 1 0 0   0 1 1 1 0 1 0
 0 1 0 1   1 1 0 1 0 1 1
 0 1 1 0   1 1 0 1 1 1 1
 0 1 1 1   1 0 1 0 0 1 0
 1 0 0 0   1 1 1 1 1 1 1
 1 0 0 1   1 1 1 1 0 1 1

Recall from class that we can form a sum of products equation that produces a particular output.  We can obtain an equation for an output by taking the sum (combined OR) of the products (combined AND) of all inputs that provide a true output.  We ignore all inputs that produce a false output.  Notice that for output 1, the first set of inputs, A=0, B=0, C=0, and D=0, provides a true input.  When we see a false input, we include in our product a negated input variable.  When we see a true input, we include in our product the input variable itself.  So, the first product in the sum that produces output 1 is NOT A AND NOT B AND NOT C AND NOT D.  We ignore the second input A=0, B=0, C=0, D=1, because it produces a false output.  We use the third input of A=0, B=0, C=1, D=0, because it produces a true output.  The product from this equation is NOT A AND NOT B AND C AND NOT D.  Notice that we sum the inputs as shown below.

Output1 = ~A~B~C~D + ~A~BC~D + ~A~BCD + ~AB~CD + ~ABC~D + ~ABCD + A~B~C~D + A~B~CD

Computing the equations for the remaining outputs is up to you.  Though, it isn't actually necessary to write out the equations to complete this assignment.

You may want to write out all the equations for the outputs, but it is not required.

Submitting Your Program:

To turn in your program use the dropbox for Project 3 on eCompanion.  You must submit the .jls file for your circuit.  The .jls file must include a logic circuit simulation that will produce outputs necessary to display a digit on a calculator as explained above.  It is recommended that you use the sum of products equations to directly produce your logic circuits.

Be sure to include a signal generator; input pins named A, B, C, and D;  Output Pins named Output1, Output2, Output3, Output4, Output5, Output6, and Output7; a Stopper; and appropriate logic gates.  You may wish to look at the examples provided here.