Computer question.

Joel,

Check out the “How Stuff Works” web site.

It’s got some decent introductory information that may be just what you need. There’s not a lot of other information out there for basic computer technology for the layman. Sure there’s the “Idiot’s guides” and “for Dummies” books, however these focus more on how idiots and dummies can use a computer - not much on the nuts and bolts. There’s a book called “How Computers Work” by Ron White, but frankly I can’t recommend it. It’s OK for kids and teenagers, but not someone who wants to seriously understand computer fundamentals. I think the “How Stuff Works” website is better.
To your specific question:

This can be answered on two levels:

(1) Think of the 1s and 0s as arbitrary symbols. In the same way that we can construct a language from basic sounds, we can assign meaning to patterns of 1s and 0s.

(2) At the hardware level, the patterns of 1s and 0s are transformed into new patterns of 1s and 0s. It just so happens that the hardware is configured such that the ‘operation’ on one or more patterns will produce another symbolically meaningful pattern.

Here’s a really simple example to show you what I mean and to give you a taste of how this stuff all works. Let’s take the binary number 01000010. If I choose to think of this symbol as an integer, then it’s equal to 66 in base 10 (the numbering system you know and love). However, this is a somewhat arbitrary assumption. The same pattern of 1s and 0s is also the symbolic representation of the letter ‘B’. In a computer program, if that pattern were encountered where an instruction was expected, it might represent an add operation. When dealing with complex data structures, it might be an identifier for a data type. In other words, as with any symbol, context matters.

Now if I take that pattern of 1s and 0s and perform a simple transformation such as a logical shift left I get a new pattern: 10000100. In this context, I’ve assumed that the symbol is a binary number. Interestingly, if I choose to think of this as a positive base 10 integer it’s equal to 132. If you’re astute, you might notice that 123 = 66 x 2. So, a shift left is the same as a multiply by two. Guess what. A shift right is the same as a divide by 2. In fact, most computers implement multiplies and divides as a sequence of shifts and adds… BTW, in this example, the binary number 10000100 has another common symbolic meaning (depending on context) - it could also be the number -4. When dealing with positive and negative integers, the left most bit is the sign (0 means positive, 1 means negative). There are other similar conventions to represent real numbers, strings, and nearly any symbolic entity that you could imagine. They are all simply patterns of 1s and 0s and dependent on the operation that you perform on them to give them meaning… Does that help?
As for those ‘experts’ who are telling you that there’s no reason to understand how computers work - I think their full of crap. The best software engineers are the ones that know what’s going on at a machine level and understand the physical interfaces. I encourage you to pursue your goal, just don’t get discouraged. The key to understanding computers is hierarchy. Start from the ground up. There are hundreds of layers between understanding binary arithmetic and understanding your Pentium III.

Oops!

Make that 132 = 66 x 2

Mailbag (How do computers work?/27-Sep-1999):

http://www.straightdope.com/mailbag/mcomputers.html

132 = 33 x 4 (Just thought I’d let you know)

Thanks. I do know about how negative and posative numbers are stored, and about strings, and so on. Anyway, I’ll check out the web site. Thanks.