Learning about how the core components of computers work
Learn about the measurement of information and binary number system
Computer
What is a Computer?
Before 1940, the definition of a computer was a person whose job was doing calculations!
In the
1800s Charles Babbage designed a couple of mechanical
computers but never really got them to work. He worked along with Ada Byron Lady Lovelace, considered the first computer programmer.
The key to computation is the process (called an algorithm
in computer terms). A computer is anything that can follow a defined process
to come up with a result.
Personal Computers
Starting with the Apple computer in 1978, there have been a series of personal computers. The original IBM PC in 1981 created a market for generic PCs.
Supercomputers
Supercomputers are designed to be as fast as possible, to be able to do very complex calculations, often for scientific and other simulations.
Instead of attempting to make a single computer faster and faster, another option is to have many computers work together. These can be physically in the same place, running essentially the same system (cluster) or they can be distributed anywhere on the web, running a variety of systems (grid).
See http://www.grid.org for a list of some large-scale research projects using computers on the Internet.
The original IPM PC in 1981 ran at 4.77MHz. With the increased data size of
the processor, this means that computers now are at least 1000 times faster
than those in 1981. This kind of increase changes qualitatively what
can be done with a computer. As computers become faster and more powerful, the
things that people think of for them to do also change. Computers are not just "electronic typewriters" doing word processing, spreadsheets and accounting.
They are interactive, multimedia, communication devices and the way they are
used will continue to change along with our imagination of what they can do.
Word Size
This refers to the number of bits the CPU processes at one time. Early CPUs were only 8-bit. This increased to 16-bit, then 32-bit, and the newest CPUs are 64-bit.
A CPU accesses memory for instructions and data. The standard memory is RAM (random access memory) which is temporary - holding the currently active programs and data.
Cache
A memory cache is a small amount of very fast access memory (sometimes packaged within the CPU itself) that holds recent programs and data.
When we mention storage here, we are referring to storage of data. Data can be stored on a variety of devices these days included but not necessarily limited to: hard drives, diskettes, tapes, cds, dvds, and flash drives. The media tends to keep getting smaller and less expenses. What we are currently spending to buy a 500 GB hard drive, 20 years ago we were spending the same amount for a 5 MB drive.
The text offers some great information on this history of storage devices as well as the current and future technology. For additional information, refer to the following:
A bit is a binary digit with value 0 or 1. It is the smallest unit of information.
A Byte is 8 bits put together as a single entity. With 8 bits, there are 28=256 combinations. A character such as A, B, or C is represented by 1 Byte.
Multiple Bytes give larger numbers of possible combinations
216 = 65536 (64K)
224 = 16777216 (16M)
232 = 4294967296 (4G)
Metric prefixes (learn these!)
Giga = billion
Mega = million
Kilo = thousand
milli = 1/thousandth
micro = 1/millionth
nano = 1/billionth
Computer people actually use K=1024 instead of 1000 (You can ignore this for all practical purposes). The reason is that internally the computer uses the binary (base 2) system, and 210 = 2*2*2*2*2*2*2*2*2*2 = 1024
Binary/Octal/Hex Number Systems
Since the CPU is designed internally with on/off switches, everything is in binary. The binary numbering systems is what the computer uses and what it understands. Binary numbers tend to have too many digits for humans to deal with easily, so they are often grouped in 3s (octal) or 4s (hexadecimal) to make them more compact.
Binary - Octal digit (note only valid through 7)
000 - 0
001 - 1
010 - 2
011 - 3
100 - 4
101 - 5
110 - 6
111 - 7
Binary - Hex digit (note an additional 6 digits are needed, so ABCDEF become digits)
0000 - 0
0001 - 1
0010 - 2
0011 - 3
0100 - 4
0101 - 5
0110 - 6
0111 - 7
1000 - 8
1001 - 9
1010 - A
1011 - B
1100 - C
1101 - D
1110 - E
1111 - F
Conversion to decimal cannot be done by grouping digits, but involves powers of 2.
Didn't Get Enough Binary Information? Try the following:
NOTE: Below is just an image of the Windows Calculator. You cannot perform any tasks on it. To open the real Windows calculator, click your Start button, select Programs, select Accessories, then select Calculator. It will undoubtedly open in Standard mode. To change to Scientific mode as displayed below, click View on the menu bar of the calculator window and select Scientific.
This has a scientific mode in which you easily convert between systems. Just enter the number with the appropriate Hex, Dec, Oct or Bin checked, then click on the system to convert to.
For example, try these
Convert 2005 decimal to binary (Ans. 11111010101)
Convert 1A4 hexadecimal to decimal (Ans. 420)
Convert 547 octal to binary (Ans. 101100111)
Note that often octal numbers are denoted just by starting with 0, and hexadecimal by starting with 0x, so 0547 would be understood to be octal, and 0x1A4 would be hexadecimal without having to specify the system.
Mac Users
If you are a Mac User or for some reason do not have the Windows Calculator, you can go to the following web site to perform your conversions:
Because we use a language that consists of more than 1s and 0s, we need a way of converting our language of words to and from the computer language of 1s and 0s. To this end, encoding schemes have been developed to standardize the representation of characters to computers.
ASCII
The ASCII code is a way to store text as 1 Byte = 1 Character. Each character is represented by a sequence of 8 1s and 0s. When you type characters on your keyboard, there a small processor built into the keyboard that automatically converts your typed character into the corresponding 8 bit sequence. Because 8 bits are used, 256 different characters can be represented (2*2*2*2*2*2*2*2).
Since many languages in the world use other characters than the standard alphabet, Unicode provides 2 Bytes = 1 Character. This provides 65536 possibilities, enough to code all languages. Most modern editors and web browsers use Unicode.
An image is an array of pixels (picture elements), each of which is commonly specified by RGB (Red, Green, Blue) intensity (3 Bytes or 24 bits). There are many different formats in which images can be saved. Each developer of a drawing or paint program thinks they have a better method of storing an image and thus, different formats develop. Some of the popular formats include TIF, BMP, and PSD.
When you create web pages, there are only 3 image formats that every browser supports the display of: GIF, JPG and PNG. Each of these provides a degree of compression which means that the size of these saved files will be much smaller than the equivalent BMP, TIF, PSD, etc type of file. The reduced file size also means that the web page will load faster as there aren't as many bits to load as with one of the other image formats. Formats such as BMP, TIF, PSD, etc. can be used in web pages, but the person accessing the web page will only be able to see them if they have a program on their PC which can display them. Of course, since the size of these files can be huge, the person requesting a page with a BMP or TIF image in it, may give up on the page long before the image is loaded.
Bitmap
A bitmap stores the RGB value for each pixel. So a 640 by 480 image would take 640*480*3 = 921,600 Bytes
This is a way to encode the image without losing any information. Essentially, a series of pixels of the same color do not need to be stored individually, just a special code that says how many there are of that color.
With photos, there may not be many pixels of the same color, and in addition, the human eye does not really need all of the pixels to see the image clearly. This encoding has a quality setting, and will discard information to make the file size smaller (the original should be saved separately in case later editing is needed).
With diagrams, this encoding can cause "ringing" noise around lines if the quality is low.
This is not as noticeable with photos, so JPG is best used with those instead of drawings or diagrams.
JPG is a lossy format. This means that when a JPG image is decompressed, some of the bits are lost. This might not be a problem the first time a lossy image is decompressed, but if it is compressed (saving a file in lossy format) and decompressed a lot, the image may eventually look washed out or nothing like the original. If you are into photography, it is best to save your original in a lossless format such as BMP, TIF, or PSD, make a copy of it and save the copy in the JPG lossy format for web pages.
Somewhat like GIF, but uses an unpatented, unlicensed compression algorithm.
Image editors
Microsoft Paint can be used to edit images, but is very limited. The classroom computers also have Microsoft Office Picture Manager which provides some large scale changes to be made to the picture.
The MS Paint program that comes with MS Windows XP Professional (this may be true of other MS Windows versions also, but I can't verify) allows you to save images in GIF, JPG or PNG format. To open MS Paint, do the following:
Click Start button
Select All Programs
Select Accessories
Select Paint
Either create your painting using the Paint tools or copy an image from your clipboard to the Paint desk-top. To save as one of the accepted web image formats do the following:
Click File on the Menu bar
Select Save As
In the Save As window and the Save In field, select the folder in which you want to save your image.
In the File Name field, select a name for your file
In the Save As Type field, click the pull-down arrow and select one of: JPEG (*.JPG,*.JPEG,*.JPE,*.JFIF), GIF (*.GIF), or PNG (*.PNG) file formats. GIF and PNG are commonly used for drawings and standard images; JPG is used for photographs.
Sound Encoding
Sound is sampled, meaning that a numerical value is assigned at specified intervals.
CD
"Data in the CD digital audio format is encoded by starting with a source sound file, and sampling it to convert it to digital format. CD-DA audio uses a sample rate of 44.1 kHz, which is roughly double the highest frequency audible by humans (around 22 kHz.) Each sample is 16 bits in size, and the sampling is done in stereo. Therefore, each second of sound takes (44,100 * 2 * 2) bytes of data, which is 176,400 bytes." (http://www.pcguide.com/ref/cd/formatCDDA-c.html)
WAV
A WAV file is a container for various encodings, but often this is an uncompressed file. There is a Windows Sound Recorder that will open and create these and allows for some minimal sound editing. To open the Windows Sound Recorder, do the following:
Click on the Start button
Click All Programs
Click Accessories
Click Entertainment
Click Sound Recorder
MP3
This is an encoding method for sound that compresses it, so more can be stored on devices and transferred more quickly.
The Microsoft Sound Recorder provides some very basic editing. To open the Windows Sound Recorder, do the following:
Click on the Start button
Click All Programs
Click Accessories
Click Entertainment
Click Sound Recorder
Video Encoding
Video is essentially a series of images at 30 frames per second, plus sound. There are special encoding techniques that can take advantage of aspects not only within each image, but also from one frame to the next.
CODECs
There are many, many video formats and CODECs. Video players may support a variety of these and may be able to download additional ones if you attempt to open a file not supported.
The Real format requires the RealPlayer (http://www.real.com/ not installed in the labs)
The Quicktime player is available from Apple (http://www.apple.com/quicktime/products/qt/) and a $30 upgrade to the Pro version adds some limited video editing capabilities.
Video Editing
Microsoft Windows Movie Maker is provided with XP, and provides limited video editing. We will use this later in the course. To open, do the following:
Click Start button
Select All Programs
Select Accessories
Select Entertainment
Select Windows Movie Maker
CODECs
A program that does COding and DECoding. There are a large number of these for various data types.