| CompOrg Fall 2001 |
|   Assignment   |   Stuff you need to know   |   What and How to submit   |   Grading   |   Notes and Hints   |   FAQ |
|
Assignment |
You are to design a 4 bit counter. The counter is a
component that has 2 inputs labeled INC and
CLEAR, and 4 outputs labeled C3 -
C0. The operation of the counter is described
in detail below - the general idea is that outputs represent a 4 bit
binary number and when the INC input becomes 1, the number represented by
the outputs increases by 1. When the clear input becomes 1 the outputs
should all be set to 0 (the number represented by the 4 outputs is 0).
Here is a more specific description of the operation of the 4-bit counter:
The initial state of the outputs C3 -
C0 is undefined (when the power is initially
turned on these outputs can be anything).
When the CLEAR input it set to the value 1, all
of the outputs should be set to the value 0.
When the INC input changes from the value 0 to the
value 1, the 4-bit binary integer represented by the outputs
C3 - C0 should
increment. For example, if the value of the outputs was 0010,
then once INC changes to a 1 the outputs should become
0011, note that these two values for the outputs represent
the integers 2 and 3.
NOTE: Output
C0 is the least significant bit in
the binary number (C0 is the 1s
place, C1 is the 2s place,
etc.).
The counter should "roll-over" when it reaches the number 15 (all outputs have the value 1) and an increment operation occurs. This means that 15 + 1 = 0 as far as the counter is concerned (addition is modulo 16), so the next state of the outputs would be all 0s.
The operation of the counter when both inputs have the value
1 is not defined - your counter can do anything (you
don't need to consider this possibility).
When both inputs have the value 0 the outputs remain constant (they continue to output the current binary number).
Here is a picture of counter with push buttons connected to the inputs:

The idea is that INC input is 0 unless the user is
pressing the corresponding button. When the user is pressing the button the
value of the INC input is 1, when the button is released the
INC input returns to 0. Likewise for the CLEAR
input and corresponding button.
Your design must include a logic diagram showing what gates are needed in the counter and how they are connected. You should also include a brief text description of your design and any supporting boolean equations or truth tables. The description should be detailed enough to explain how your design works - this is important since we might not be able to see why your design would work! (please remember that the TAs will be grading lots of these and can't spend 1/2 hour on each one).
You can use any of the gates we have discussed in class (AND, OR, NAND, NOR, XOR), you can also use multiplexors and decoders, S-R latches and D flip-flops, but you must make sure you show the connections to these components clearly (label all the inputs and outputs so we can tell how you are using the components).
|
Things you will need to know |
How to translate the functional description of the project to boolean equations, truth table or gates.
Basic logic design including how to design a circuit using gates. This includes usage of combinational and sequential logic components.
understand a 4 bit binary number (positional notation) representing the decimal values 0 to 15
How to use a latch or flip/flop to store a bit
.|
Submitting |
You should submit hardcopy of your design and description to Dave in class, in his mailbox in the CS office in Lally, or in either of the TAs mailboxes in the CS lounge in Amos Eaton.
|
Grading |
The correctness of the design is worth 75% (will it function properly?). Partial credit will be given based on the portion of the design that is correct. The other 25% will be based on your supporting desciption of the design.
|
Notes and Hints |
Convince yourself that this is impossible to do with a purely combinational circuit. Remember that in a combinational circuit the outputs depend only on the current value of the inputs, and we clearly have outputs that depend on the previous output values
It's worth drawing the sequence of output values that would be generated if the INC input was continuously pressed. There are significant patterns to each of these outputs, and if you recognize these patterns the design becomes fairly simple.
Try starting with a 1-bit counter. In this case every time
the INC button is pressed the single output changes
(is toggled). Once you have designed this 1-bit counter stare at
the truth table for the 4 bit counter and realize that you have
just taken care of C0!
If you use a flip/flop or clocked latch - remember that you can hook anything you want to the clock input (we don't have a constantly changing signal that could be used as a clock, nor would we want one for this application). The input labeled clock on a D Flip/flop is just an input that must be a 1 for the value stored to change.
If you find that parts of the circuit are becoming complex, consider constructing a truth-table for that part of the circuit, deriving SOP expressions and doing minimization.