24 January 2012

Not Quite Binary Code

One of my classes is called Introduction to Computer Architecture. Don’t ask me to tell you what it’s about, because I haven’t learned that part yet. I’m told we’re getting there.

It’s actually one of my favourite courses, though, mainly due to the amiable, somewhat eccentric British professor who teaches it. I’ve learned more about Douglas Adams and the gospel of open source, than I have the actual coursework, but we’re only two weeks in and we’re getting there.

Anyway, our most recent lab was based on a programming language called CRAPS, which he wrote himself, a modified, simplified version of SPARC. It’s a very low level language - for those not familiar with programming. It’s a language that makes you essentially tell each individual transistor on a computer chip what it should do at any given moment. It isn’t quite binary code (0101010011110010101001010), but it’s only one level up.

To compare, English is a high-level language. It’s way too subtle for computers to understand. Machine code, the lowest level language, is much too simple for humans to understand. So all the levels in between are intended to find a compromise.

The goal of our assignment, as far as I can tell, is just to demonstrate that when you get right down to the transistors and wiring, there is no magic. A computer never does anything other than exactly what you tell it to do.

It was a failure, in my case. I’m still convinced that it’s magic. I definitely didn’t understand the program I was to modify, even after working on it for a week, with the professor holding my hand the whole time. After I finally got it “done” (with much help), I asked, “how can I possibly reproduce this on a test?”. He replied, no, this won’t be on the exam. So I asked, “will I have to reproduce it for an employer at some point?”

He said that in a survey, most employers thought that the Computer Architecture class should be dropped from the curriculum, but they also thought that graduates should possess the knowledge of low level programming that the class teaches. A bit of dichotomy.

So I find that I must have learned/be learning something very important and profound, but no one will ever call me on it. What was the point? I hope, really hope, that in a few months or years I’ll be able to answer that. I can’t now.

No comments: