See
    http://www.nand2tetris.org
    The Elements of Computing Systems: Building a Modern Computer from First Principles.