Basic cpu logic