Jupyter notebooks with some NAND code
Jupyter Notebook
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


The NAND programming languages

This is a collection of Jupyter Notebooks for the NAND family of programming languages that accompany the upcoming book Introduction to Theoretical Computer Science.

You can launch all the notebooks live using Binder (this service is in beta status and sometimes takes a long time).

However, if you want to play with them more extensively you'd probably want to download them to your own machine. You can do so by (1) clone/download (using the this button button on the top right corner) all of the files to a local folder, (2) install anaconda, and then install Jupyter Lab by opening up a command prompt (or maybe "anaconda prompt", in windows) and type conda install -c conda-forge jupyterlab. You then change directory to the folder containing these notebooks and type jupyter lab. For visualizing circuits you will need to also install graphviz, which I believe can be done by typing conda install -c anaconda graphviz

The main notebooks contained in this repository are:

  1. The NAND Programming Language ( live version on binder: Definition of the NAND programming language, relation to Boolean circuits, syntactic sugar, computing every function, and representing it as list of triples

  2. Blog post about the course (live version ) : giving a high level overview of the main results in the course.

  3. NAND++ programming language ( live version ): an overview of the NAND++ programming lanaguage.

  4. The Cook Levin Theorem (live version ): overview of the Cook Levin Theorem.

  5. Lambda calculus ( live version ): some notes on the lambda calculus and the Y combinator. (In somewhat incomplete state.)

Note: As of Summer 2018 I am changing a bit the syntax of the languages, and hence some notebooks use the older syntax foo := bar NAND blah and some use the newer syntax foo = NAND(bar,blah)