Specifications

To build a combinational circuit to perform the above operations is a considerable task (I know, I have done it), but there is a lot of redundancy; design (and package) the correct modules and it becomes much more managable.

Your circuit will consist of 3 parts. These will perform the following functions:

  1. For each digit of the credit card code, multiply it by the appropriate weight and produce the correct result digit (digit, - not number - see step 1)
  2. Add the resulting 15 digits together to produce the input to the check digit generator ( see step 2)
  3. Create the check digit operation using a mod-10 operation (step 3)

Each of the above can be built from modules: a module that produces the weighted digit, and a module that adds a digit to the sum. Build, package, and check these modules independently. When you are sure that they work, combine (a large number of these) with the check-digit creator into the final circuit that takes 15 input digits and produces the 16th.

Be sure to hand in separate circuits for the modules as well as the combined circuit.