Link Bar

Home | Games | Programming | Tutorials | Donate | Legal (These are mostly empty right now. Placeholders!)

warning code

This website contains adult content.

Sunday, February 26, 2012

Down the Rabbit Hole...

I started reading the textbook for The Elements of Computing Systems, it's very accessible and I recommend it to anyone who wants to know more about how computers work.  Here's their course map:
From The Elements of Computing Systems, by Noam Nisan & Shimon
Schocker (free online course) http://www1.idc.ac.il/tecs/book/preface.pdf

I just read through the preface & introduction, and I can't wait to get started!  I'm already learning new things, like the different levels of abstraction (as represented in the image above, and the text block below) that really go on inside the box.  I used to think that you just had your programming language, which was made "binary compatible" (whatever that would mean) by the compiler (whatever that did), and the computer ran on binary.  Well, binary and smoke (if you let the smoke out, the computer stops working).  Lo and behold, the introduction comes to the rescue, curing me of my misconceptions:
If you have taken any programming course, you’ve probably encountered something like the program below early in your education. This particular program is written in Jack—a simple high-level language that has a conventional object-based syntax.
// First example in Programming 101:
class Main {
function void main() {
do Output.printString("Hello World");
do Output.println(); // New line.
return;
}
}
Trivial programs like Hello World are deceptively simple. Did you ever think about what it takes to actually run such a program on a computer? Let’s look under the hood. For starters, note that the program is nothing more than a bunch of dead characters stored in a text file. Thus, the first thing we must do is parse this text, uncover its semantics, and reexpress it in some low-level language understood by our computer. The result of this elaborate translation process, known as compilation, will be yet another text file, containing machine-level code. Of course machine language is also an abstraction—an agreed upon set of binary codes. In order to make this abstract formalism concrete, it must be realized by some hardware architecture. And this architecture, in turn, is implemented by a certain chip set—registers, memory units, ALU, and so on. Now, every one of these hardware devices is constructed from an integrated package of elementary logic gates. And these gates, in turn, can be built from primitive gates like Nand and Nor. Of course every one of these gates consists of several switching devices, typically implemented by transistors. And each transistor is made of— Well, we won’t go further than that, because that’s where computer science ends and physics starts.
Computers are like way faster than I ever realized.  Also, no wonder my framerate starts chugging when I jack up the draw distance.

I also read the tutorial on the hardware simulator, and the lecture notes on the introduction.  I'm calling it:  my brain is officially full.  Project 00 can wait until, I dunno, whenever I get sick of trying to fix Fetris.  Catch you crazy cats later.

No comments:

Post a Comment