Building a computer from first principles