Music and Title "How Computers Work - Basics"
(music fadeout)



1
You've already seen in the previous tutorial something of what's inside a computer. Now, we're going to try to explain in a very simple way some important concepts concerning how these insides work and relate with the world we experience around us.



2
Computers are dumb. At any given instant they can only be working on a single process-- one thing at a time-and basically the only thing they do is turn on and off. The fact is we can quite usefully think of computers simply as a collection of on off switches. Not mechanical switches to be sure, but the same functional thing in a very fast-working electronic form. Still the only thing these switches can do is turn on and off. Electrical engineers often refer to on as high state and off as low state. Once we grasp the fact that computers can only turn on and off, they become pretty easy to understand.



3
In fact the only things that I still find hard to comprehend about computers is that 1) they have millions and millions of these switches in them (our lab Macs have over half a billion switches in their RAM chips alone) and 2) that they work incredibly fast. (The most recent computers can turn these switches on or off over a billion times in a single second.)



4
As humans we tend to be more comfortable thinking of the on/off states of these electronic switches as numbers, "0" and "1." Notice that I said "0" first. Computer engineers usually use reverse logic so that "0" represents current on and "1" represents current off. The name that we attach to these numbers, or high low states of electrical energy if you prefer-- is "bits." That' s just a short name for binary digit.



5
Now, no matter how fast a switch works, if it can only be one of two states, high or low, it can only express two things. No matter what meaning we attach to those two states, that's not a very big vocabulary. Reminds me of some band directors who can only tell their bands "Start" or "Stop." So the question then is how are computers able to do so much with such a limited basic vocabulary? Well, by interpreting several of these switches together as a group.



6
Even from the very beginnings of computer technology, it has been common to consider bits in groups of 8, a practice that we still follow today for most computer oriented technologies. The name that we attach to this group of 8 bits or switches is "byte." If we go through all the possible permutations of the 8 1's or O's that can be contained in an 8 bit byte, from all zeros to all ones, we find that we have 256 unique combinations. To demonstrate that, here they are



7
Notice that we're attaching a number to each of these combinations-- a decimal number from 0 to 255 that's meaningful to you as a human. Computers can count and do math too, but because they only have 2 states to work with, high and low, they use a numbering system based on 2 digits rather than the 10 that humans normally use. The base 2 numbering system computers use is called binary and it works on the principal that each place in a number is twice the value of the place to its right rather than ten times the value as in decimal numbering.



8
Since the rightmost place has a potential value of 1, the next place over has a potential value of 2. The next has the value 4, then 8, 16, 32, 64, and 128. Even when each place is only twice the value of the previous place, it's easy to see that we can still represent any number with only the two digits 0 and 1. Of course if we only have 8 bits to work with we can only number as high as 255.



9
Incidentally, here are a few other bit concepts that we'll find useful later on. First, the bits on either end of a byte have names. The rightmost is called the LSB, least significant bit, because its numerical potential is less than that of any other bit in the group. Conversely the leftmost bit is called the MSB, Most Significant Bit, because its numerical potential is greater than that of any other bit in the group.



10
Sometimes we need to refer to the four bits on either end of a byte. We call either of these halves of a byte a nibble. (That ought to be easy enough to remember.) The least significant nibble, the LSN, has the potential of representing any number between 0 and 15-- that's a total of 16 values, the most significant nibble, the MSN, represents every 16th number between 16 and 240.



11
Now, don't get nervous. Doing math with binary numbers isn't really what this class is about. It's more important for our purposes to understand that even with a single byte, 8 bits, a computer can express 256 different things. What these things are depends on the type of program that is n running. 256 different unique expressions actually more than enough for many of the tasks computers have to do-- like communicate verbally. With 256 combinations we can, for example, represent all the letters of the alphabet, both upper and lowercase, accent marks, numerical digits, punctuation marks and even some text formatting features like carriage returns, line feeds.



12
If you use a word processor or an email program, this is exactly what your computer is doing. Play with this translator to see how the American Standard Code for Information Interchange, or ASCII, interprets the on/off switches for all text based applications throughout the world.



13
Now use the interpreter to translate this collection of ons and offs. You see this often!



14
MIDI programs like the music sequencers we'll be working with later use the same combinations but they interpret them differently. Try some of these combinations as a preview of the MIDI language.



15
Of course many things in our world are too complex or subtle be represented well with a vocabulary of only 256 unique expressions, So how do we express things like colors or sound timbres? We simply combine bytes together-- the permutations of combined bytes expand exponentially. For example, the unique bit combinations possible in 2 bytes (16 bits) is 65536 and in 3 bytes (24 bits) is 16,777,216. Remember that computers have millions of little switches to use so now we can begin to realize the almost infinite possibilities of representing anything with their simple switches. Sometimes computer engineers refer to a whole group of 16 bits as a "word" and a group of 32 or more bits as a "longword.".



16
Take the image you see on your computer monitor as an example of this type of complex information representation. Your computer' s video circuits are showing you the picture you see simply by setting millions of on/off switches. The video circuits in our lab computers display an image as a set of 1024 dots horizontally and 768 dots vertically. This totals 786,432 dots, or pixels as we normally call them. Each one of these dots is actually controlled by 24 switches in the video memory chips of the computer, 8 to control the brightness of red, 8 for green, and 8 for blue. This allows your monitor to represent any of 16,777,216 colors at any one of these pixels. That' s as many colors as your eye can distinguish. With a total of 6,291,456 on/of switches, your computer can give you a high resolution representation of the visual world.



17
Incidentally the same is also true of the aural world. If we want to represent sound with millions of switch combinations, we simply measure the sound wave at periodic time intervals, store the numbers, and then reconstruct the sound by spitting those numbers back out at the original time intervals.



18
What we're actually talking about here is a new way of representing the things we see and hear in the world. That is by taking measurements of some real world phenomenon, storing the numbers in binary form, and then reconstructing the phenomenon later from those numbers. This paradigm is called "digital" representation, and it differs fundamentally from the traditional analog methods of simply making a picture of the phenomenon in some other medium. Because computers can deal easily with huge quantities of numbers and they are becoming ever faster, digital representation is quickly becoming the predominant form of audio-visual representation in the modern world.



19
One of the offshoots of this new method of representing visual and aural phenomena is the necessity of dealing with huge quantities of measurements taken at extremely small intervals of time. To make this easier technologically literate people have recently had to add new terms to their working vocabularies. For dealing with small numbers or sizes, the terms milli, micro, nano, and pico are often used now. For example:
"That 12 millisecond digital delay gives quite an echo effect to your voice."
"The new microprocessors measure their transistor elements in microns (millionths of a meter)." "Newer RAM chips have access times of 60 nanoseconds or less."
"Did you know that even light travels only 11 inches in a picosecond."



20
Conversely we now use the terms kilo, mega, giga, and tera for dealing with the large numbers associated with computers .
For example:
"That MIDI sequencer file takes up only 30 Kilobytes of RAM" Kilo is usually interpreted as 1000. But because computers use binary rather than decimal math, it really means 1024 or 2 to the 10th power) (2x2x2x2x2x2x2x2x2x2).
"The lab Macs have 64 megabytes of RAM." This also means more than it sounds. Commonly interpreted as a million, it actually means 1,048,576 or 2 to the 20th power
"It took 2 gigabytes of disk space to record that 5 minute video." is a billion, or more accurately 1,073,741,824, 2 to the 30th power.
"Those new DVD disk arrays hold over a terabyte of information." is a trillion, or 1,099,511,627,776, 2 to the 40th.



21
(music fadein)
There is nothing really mysterious about the inner workings of computers. The concepts demonstrated in this tutorial form the basis for understanding how they deal with everyday information from text to images to music.
(music up) (fadeout)