RAM alternative

Introduction
RAMs can do almost anything; they can store data or they can act as truth table. They don't cause much lag and they are very compact. You call them the microcontroler of the game because they are always the easiest solution.

ALU
RAM are of course the best way to make an ALU because they are very stable e.g. : if you want to make a 4 bits full adder, a simple adder takes 2 updates but the carry takes 2x3 updates more to go from the LSB to the MSB. Using a RAM as a truth table, the each bit of the result come synchronously after 4 updates. You can see a basic example in the CPU of Tobias.

Counter
The best way to make every type of counter of every speed (from 1 count/update) still using RAM, to do that just point the next address you want in the memory, and connect the output with the address of the RAM. Warning: if you want to make a less than 4 count/update you have to be clever.

Clone trick
When you input 1 load pulse at the same time as changing the address, you will clone the data of the first address into the second address (it's very useful to know when you make a fast CPU and that will help you to understand the next section.)

Hardcore RAM using
This section is very experimental, it will explain how the "Too piti CPU" is done and how this way of building circuits is hard.The idea is, seeing what RAM can do, why not do serval things in one RAM ? The difficulty of this type circuit is to reduce the number of buffers and controls because we don't want to waste the space gained placing less important component. Anyway to make this type of circuits, attribute one (or serval) address pin to divide the memory into serval modes (when the circuit runs, and the pin is turned off, the first mode is selected and so on). The other pins have to be attributed to one task each mode. This way, the "Too piti" use one RAM as a ROM and a Program Counter, and an other RAM as an ALU and several registers