>To build a CPU, you need a few more elements than basic logic gates, namely memory and a way to synchronize everything to a clock, but this is a good starting point.
You can actually make all that with logic gates! Two NANDs with each's input connected to one of the other's output makes the most basic sort of static memory element. 4 NANDs and an inverter give you a D-latch that lets you synchronize your circuits to the clock signal. You can use fancier techniques that don't correspond to these so well but these are actually all you need.