- create a working CPU that has handling of arbitrary sized data implemented in hardware
- no programmable devices are allowed as parts of the CPU
- as I only want to find out how to do this and don't really need it for anything else, speed does not matter.
- Input: punch cards maybe?
- Output: Data lines to Arduino (simple) or to 7-Segment displays (a bit more difficult)
- Operations done by hardware: add, subtract, conditional jump, read from input, read from internal memory, write to output, write to internal memory
- Be able to extend later to include multiplication
Warning: The following is a idea I had on how to do it. It is untested and most likely does not work like it should.
Here is a diagram to help understanding my explanation:
Except the subcounter register, which I will explain in the next paragraph, there is really nothing special here. There is a common bus, connected to the memory, ALU and a temporary register (or generally any number of fixed-width registers could be connected, which could be useful for output).
The main problem is, that you can't just build a ALU for adding two numbers, as the numbers may have any size. So what I added is a thing I called subcounter, which has 64 states, which each have 8 microinstructions, which can set the state of the subcounter. So one subcounter state can for example fetch the next two digits from a number from memory, add them together with the carry, store that at the output memory adress, determine whether all digits have been added (if yes: execute same subcounter state again; if not: load another subcounter adress which fetches the next instruction). This should allow the necessary recursion for the variable data size.
One thing I did not include in that diagram is everything related to conditional branching, as I am not sure how I will do that.