Sunday, April 27, 2014

The Elements of Computing Systems, Chapter One

As a programmer and a maker, I think it's important to understand how computers work on all levels. I'm incredibly jealous of people who can build computers in games like Little Big Planet or Minecraft, because it's something I'd love to learn how to do. My dad showed me this book, and we decided to work through it together.

Even though you might worry that the information might be a little dated, coming all the way from 2005, the information is fundamental in a way that hasn't changed yet. Each chapter is divided up into various sections that will give you background information you need to complete the 'project' at the end of each chapter. The end result is using a chip design software that comes bundled with the book to build your own computer and use a higher-level language to program a game on it.

The first chapter introduces logic gates. I cannot stress enough how useful the background information is. As someone whose only experience with logic gates has been basic redstone built circuits in mine craft a year ago, and who's only taken programming courses through week long camps or online that don't delve into hardware at all, the information was invaluable.  It was easy to read, although I'd recommend having wikipedia ready to clear up any misunderstandings if you aren't familiar with some of the terminology.

The chapter ends by asking you to design each of the basic chips it mentioned (AND, OR, XOR, etc.) in the bundled software design program using only NAND gates. It gives you a short hint as to making each one, which pretty much boils down to HINT: READ THE BACKGROUND INFORMATION ALREADY.  Using the design program is simple enough. Each chip you have to design comes with three files: .hdl, the actual chip, .tst, the test script for that chip, and .cmp, the logic table the test script uses to test the chip. The test and logic table scripts come premade, but you have to drag the .hdl file to Textmate, or whatever you use, to program in the chip using their Hardware Development Language. It's very simple to learn, especially if you're used to programming.

Here's the kicker: Once you've programmed and tested a chip, if it works, you can use it in building other chips. For example, if you've successfully made your AND chip, you can use it directly in your OR chip instead of having to use two NANDs all over again. It gives you a feeling of building up your computer that's very satisfying.

Bonus: If you just aren't getting it with the programming language, you can always build a bunch of nand gates in mine craft and go from there.

I certainly liked this course enough to move on to chapter two. It does a great job of teaching, and even if the projects can be difficult, the give me a sense of accomplishment and understanding. But if you don't know anything about programming, try a programming 101 course first. It will help you have an easier time with the terminology and the design software when you get into the real meat of things