I get commissions for purchases made through links in this post.
Introduction
Throughout this series I am going to be working my way through The Art of Computer Programming. As I work my way through the collection I will be providing my thoughts on the sections along with assembly code to run the algorithms. When it comes to the exercises I will try to provide my thinking along with solutions and code when possible. Overall my hope for this blog is to help motivate me to work my way through the books, additionally I hope it is able to help someone else with either deciding to jump in or expand their knowledge.
The Art of Computer Programming is a book series by Dr. Donald Knuth that he is still currently working on expanding. The collection I have is a four book set comprising Volumes 1-4a. In this set Dr. Knuth covers the foundational elements of computer programming from a very low level. From the introduction Dr. Knuth sets up the series as a set that can be used for both self-study as well as in a formal classroom setting. He also walks the reader through the difficulty ratings for the exercises and needed math understanding.
For the math background Knuth recommends at least high school algebra for most of the concepts. For the more advanced concepts calculus and other advanced mathematics is recommended. For the sections where higher mathematics are needed Knuth marks them so that readers that are less sure of their skill level can access and skip if needed without worry of missing out on the major points.
First Impressions
When even deciding to purchase this set I read a few reviews, some of which seemed discouraging to the purchase, some that talk of purchasing as a conversation piece, but almost all of the reviews where it appears the reviewer read, or references the text showed the value of taking the time to make an attempt at reading through. It was based on the positive reviews from people that read or referenced the volumes I decided to start this journey.
When the set arrived my first impression is how much larger and heavier it is than what I was expecting. These books are the size of your standard college textbook, so four in a boxed set it quite a bit of weight. Seeing the set sitting on a table is quite a sight. I can see why some of the reviews would speak of having the set on their desk or in their library to add an air of authority. The design is simple yet still draws one’s eyes and would be instantly recognizable to anyone familiar with Knuth’s work. Without their dust covers the books have a very clean and minimalist look. To me they have a strong resemblance to old reference and textbooks from the 1960s and earlier. The overall look brings an air of importance and respect as a volume of important information.
Beyond the ivory tower appearance of the exterior you quickly find from just the introduction that this series is a work of love by someone who cares to document the information in a way that is accessible to as many as possible. While acknowledging the presence of complex subjects and need for higher math in some of the cases he makes a point of telling the reader that most of the math is built on high school algebra. Knuth also takes time to go through how the exercises are laid out and what the difficulty rating for each should equate to in terms of time needed and math skill level. Also explained is some basics on flowcharts and notations presented in a “how to read this book” example.
Why the Altair 8800?
Why not? Mainly it comes down to the fact that I have one, or a clone of one. The 8800 provides a way for me to see the algorithms and exercises running on real bare metal in a way that is easy to visualize and work with. I can film entry, executing, and stepping through the code in a way that, to me, is more visually interesting than just a VM or emulator of a computer. While Knuth provides a machine language for a theoretical computer, for which VMs now exist, I find the Intel 8080 to be interesting and quite historically significant. This will mean that I may have to translate, or find an alternative way to do what Knuth describes in comparison to his computer I find that a challenge worth the time.
Given the time I may try to provide examples of the same solution in code for both the MIX(Knuth’s computer) and the 8800, but my focus will be to do the 8800 as my primary example. I will also try to provide videos so that you can not only see the code, but also the way the computer reacts as it is run. As a visual learner I find seeing what should be happening as invaluable in being able to apply the lesson and expand it to different problems.