Computers as a set of nested functions (CIS 2400)
When I started this class I thought the biggest implications were about how to represent things in languages, and how all we get in language is representation (there is nothing behind representation). Programming was mainly a game of translations: you take structure in language (math, english, whatever it is) that you care about and transform it into structure that can run on a Turing machine. And this is a specific Turing machine where the ultimate encoding is 0s and 1s, ons and offs, or whatever other symbols you want to call them. But basically you have two symbols, and you make creative encodings with these two symbols to represent anything you can conceive of.
When I finished this class, I was (unrelatedly) much less hungry for metaphysical answers. I was not looking for the great analogies from this course to the philosophical yearnings I had. I found that many of the translations from CIS 2400 to the world of metaphysics were shaky at best when I would formalize them. I didn’t have a great understanding of my own theories, and started to believe I wasn’t building any real understanding but just gratifying my ego.
So then, CIS 2400 became a course on how computers actually work. For how much I had coded before taking the course, I still had a very shakey understanding of what was going on inside a computer.
After this course, there is no magic to computers. With enough time and resources, I could build my own computer. There is no special sauce.
Basic structure of the course
- Learn the cheapest function you can build: a switch (transistor)
- Put a few of these together to create simple binary functions
- Use base functions to build bigger more useful functions (latches, clocks, flip-flops)
- Then use these functions to build even bigger even more useful functions (math, memory, conditionals, loops)
- Compose those within each other to get assembly code
- Finally, with enough composition, you have arrived at C
The first 25% of the class is discovering that you can build functions onto an electro-mechanical device. The remaining 75% is about building a specific set of compositional functions (Von Neumann model, ISA architecture, LC4 compilers) that are useful to problems you care about.
I enjoyed working with a lower level language like C. It was my first time. I feel it is something every computer-enthusiast must understand. I should have taken it in much earlier, maybe in middle school.