| TITLE PAGE | TABLE OF CONTENTS | BIBLIOGRAPHY | AUTHOR'S HOME PAGE |
About Computer Magic:
Basics
What is a computer?
Many people now, use computers to draw pictures that are later printed out on
paper. Designers also use computers to create the graphics you see on the
computer screen, in fact the screen you're looking at right now was designed
and drawn. How does drawing on a computer work? Take a look...
Pixels:
More on Pixels and Graphics:
But what if we wanted to use more colors, not just black and white? How can you
do it if each bit can only express two possible choices? It's simple, use more
bits. If we wanted to create a picture with four colors we would need to use 2
bits. If we express those four choices using 0's and 1's it would look like
this: 00, 01,10, and 11. Each digit you see represents a bit. If you use 3
bits the possibilities increase: 000, 001, 010, 011, 100, 101, 110, and 111. So
with 3 bits you could use black, white, yellow, red, green, violet, green and
orange. Many computers today use 8 bits to describe color, that's 256 different
colors - more than you'd want to list.
Memory:
Bits and Pixels:
Step-By-Step:
Logic Gates:
AND Gates:
The gate illustrated here uses two NPN transistors in series to produce the
desired results. If either of the transistors prevents current from passing
then the output will be a low voltage signal. The transistor serves as a
switch; in fact it works very much like a light switch except that it is turned
on and off by an electrical signal rather than by the flip of your finger. The
switch is normally in the open position so that current cannot pass across the
opening, however, the switch can be closed by the application of a high voltage
signal; when this happens, current is permitted to pass through the closed
switch.
OR Gates:
This OR gate uses two NPN transistors in parallel to produce the desired
results. If either of the transistors passes current then the output will be a
high voltage signal. Again, the transistor serves as a switch; these switches
are normally in the open position, that is, current cannot pass across the
opening. The switch is closed by the application of a high voltage signal; when
this happens, current is permitted to pass through the switch.
NOT Gates:
The NOT gate illustrated uses one PNP transistor to invert the incoming signal.
This transistor is normally in the closed position; that is, current will
normally pass through it. When a high voltage is applied to the transistor the
gate is switched to the open position and no current can pass across the
opening.
XOR Gates:
The XOR configuration shown here is only one possible way of putting such a
circuit together. An XOR has the special property that the two inputs must be
different in order for the gate to produce a high voltage signal as output. The
XOR gate performs the useful task of comparing two inputs: the gate will
produce a 1 as output only if the two inputs are different, if they are the
same the gate will produce a 0 as output.
This is a program about how computers work. It is part of a study to evaluate:
1. The level of interest in learning about computers.
2. Whether this program is an effective prototype for presenting concepts of
computing.
If you would like to participate in the study, please click on the "Research
Project" button below. If you choose to participate you will be asked questions
about your understanding of and experience with computers, when you are
finished using the program you can "exit to study" to evaluate this software.
The questions will take you about 5 minutes at the beginning and another 5
minutes to evaluate the program. If you don't want to answer any questions just
click on the right arrow to move to the next screen. For more information about
this study, click on "Info".
In the center of the screen you will find activities and games to help build
your understanding of computer processes. Clicking on the Info button will get
you information about why the particular activity is significant and a bit of
background on the subject. Try clicking on the "Info" button now, to test it
out. The Help button will help you figure out what to do with what you're
seeing on the screen. Move your cursor over "Help" now to try it out.
Directions will appear while the mouse is over the Help button. If you hold
down the Help button you will see information about what's available in each
subject area. You may jump to any of the four subject areas directly by
clicking on the corner of the screen corresponding to that subject. To go to
the next screen click on the right arrow, to go back one screen click on the
left facing arrow. "Map" will allow you to jump to any screen, "Sound" permits
you to turn on and off the sound. "Restart" sends you back to the first screen
and "Quit" exits the program entirely.
To all but a few people, the CPU - the actual "computer" inside the computer -
is a mystery. Did you ever wonder what goes on inside a microchip? It's tough
to find this out even if you watch a computer very carefully. Computer
processes are measured in milliseconds (millionths of a second) - faster than
you can see them happen. Even if you could slow things down, the circuits
inside a microchip are so small you'd need a microscope to see them. The
computer uses an unusual type of sleight of hand - at least that's what
magicians call it when they do it. While you're concentrating on drawing a
picture or adding a bunch of numbers together, the computer is generating
millions of instructions that get the job done - the computer is working hard,
but to you it's magic. This program will show you some of the simple tricks
behind the magic.Graphics
Graphics:
Computers are primarily perceived as tools by their users. Unlike pencils,
paints, typewriters and calculators, some of the tools that computers mimic,
computers are not limited to one specific task or business. This
"multi-purpose" nature of computing - the ability to transcend one particular
role - uniquely distinguishes computers from earlier technological innovations.
The same computer that helps you draw a picture can also play chess, produce
audio signals that sound like a grand piano and calculate interest on a bank
account.
All screen images are composed of pixels (picture elements). A pixel is the
smallest element a picture can be broken down into. Most monitors, including
the one you're using now, can can display more than 5000 pixels in one square
inch. Pixels are so small that we are generally unaware of their presence; we
only see the big picture. The unit of information used by computers is called a
"bit"; the computer requires one bit of information to represent each pixel of
a black and white screen image; each bit is either black or white. So, about
5000 bits, are required to describe each square inch of a black and white
image; this may sound like alot but since most computers today measure, move
and store data in quantities of megabytes (millions of groups of eight bits)
any computer can create and display a black and white picture.
If an equal number black and white pixels are alternated in a small area the
eye is fooled into seeing a patch of gray. The same trick is used when photos
are printed in the newspaper or in a book; if you look very closely you can see
that all the gray tones are made up of tiny black dots. Encoding
Encoding information:
You've probably heard the term "digital media" - or even "digital multimedia".
Did you know that computers can only process information that has been
"digitized"? In order for a computer to work with information, the information
must be digitally encoded; that is described by only zeros and ones, or bits of
data. Fortunately, you don't have to do this tedious translation: there are
programs running on every computer that just translate the languages we speak,
into the only language the computer can use, a language consisting of only
electrical signals. Consider what happens when you use a scanner: the scanner
reads your artwork, divides the image into lots of tiny dots and then a program
assigns a number to represent the color of each dot. The computer sees these
numbers as a series of electronic signals that are sent through it's circuits.
The signals, high and low voltages, are what the computer really uses, we just
represent them as zeros and ones.
In this illustration of memory each address only stores one bit of information;
in a real computer there is room to store 8 bits of information at each memory
address - not just one. Each 8 bit group is called a byte. Memory addresses
correspond to actual physical locations, memory cells in either RAM or ROM. RAM
is where things are temporarily stored while they're in use. When the computer
is turned on the programs you need to operate the computer get sent to RAM; the
computer can only store programs and data in RAM while there is current flowing
through the computer, once the computer is turned off anything in RAM is lost.
ROM chips are different; they don't lose data when the computer is turned off,
but ROM stands for Read Only Memory, the only people who could store
information in these chips were the ones who designed your computer. ROM is
used to permanently store the programs that your computer needs to perform its
most basic functions.
This activity forces you to perform some of the operations that a graphics
program handles for you. When you use a graphics program to draw a picture on
the screen you don't need to know which memory address represents any
particular pixel on the screen. The operating system and the graphics program
work together to make drawing with a computer like drawing with a pencil and
paper. The operating system coordinates the motion of the mouse with the
location of the cursor on the screen - it's easier to see what you're drawing
that way! Think about how difficult it would be to draw something if you
couldn't use the mouse, or if there was no cursor on the screen; in order to
draw pictures you'd need to know how to describe the location of each pixel on
the screen to the computer. Programming
Programming:
The same computers that routinely dazzle us with their speed and computational
abilities would be nothing more than expensive doorstops without the complex,
step-by-step instructions we call programming. Without programming, computer
hardware can only discern the difference between high and low voltage signals.
In order for a computer to do any useful work it must be programmed with a set
of instructions - that's what software is. Software is like a recipe, it
provides us with step by step instructions for performing a specific task.
Consider the process of baking a chocolate cake. Now think of your computer as
a kitchen; the pans, mixers and oven are like hardware, the ingredients are
like input. If we follow the recipe step by step we should end up with a
chocolate cake. The final result of a computer program is dependent on the kind
of program you use and your input - it could be almost anything - from the
answer to a complicated calculation to a colorful poster.
If you were able to put the lines of this program in order you are smarter than
a computer: a computer receives directions that tell it where to find the next
instruction of a program, you just did it by figuring it out! Computers only
do what they have been told to do by people, but sometimes these people are the
ones who designed the computer, not the ones using the computer. For example,
when you use the computer to draw a picture, the portion of RAM that holds
information about the video display is continually sending it's data to the
screen. Because of this automated process, the changes you make to a drawing
appear on the screen immediately. You don't need to tell the computer how to do
this; the instructions were pre-programmed and are invoked automatically. There
are lots of hidden commands like this that have been designed by hardware and
software engineers to speed up processing and to eliminate the need for giving
the computer repetitious instructions.Hardware
Hardware:
Every computer function we are aware of is built out of many smaller functions
which we are unaware of. This hierarchical branching of instructions exists to
such a degree that for every command we consciously invoke, thousands - if not
millions - of instructions are executed transparently. This is why people are
concerned with how "fast" computers are; millions of instructions must execute
even though the user may have only asked the computer to execute one command.
To the computer all data and instructions look the same since all are
represented as patterns of electrical voltages. Computer hardware itself cannot
distinguish between numbers, colors, mathematical functions and directions. At
the deepest level of computer processing, transistors act as switches to
control the flow of bits through the computer's circuits.
Computer processes are particularly difficult to grasp because they exist in
two spheres simultaneously: the physical, electronic world and the abstract
symbolic world. Computers are designed so that abstract mathematical theories
correspond to physical electronic structures; circuits are designed to take
advantage of the rules of Boolean Logic. Boolean Logic uses three basic
operations, they are referred to as "AND", "OR" and "NOT". These functions,
conveniently, accept only two possible input choices (ie. 1 or 0, high or low,
true or false). Using transistors as switches, simple circuits can be
constructed to mimic the behavior of these three functions, these circuits are
known as logic gates. Gates that follow other rules can be constructed as
combinations of the basic three. Groups of logic gates can be connected to one
another to produce complicated calculations and comparisons. This process of
logical decision-making is invisible to the computer user but it is responsible
for all computer processing at the deepest level. A microprocessor can contain
millions of logic gates.
The Boolean "AND" operator yields the following results:
If the inputs are 0 and 0 then the output is 0.
If the inputs are 0 and 1 then the output is 0.
If the inputs are 1 and 0 then the output is 0.
If the inputs are 1 and 1 then the output is 1.
The Boolean "OR" operator yields the following results:
If the inputs are 0 and 0 then the output is 0.
If the inputs are 0 and 1 then the output is 1.
If the inputs are 1 and 0 then the output is 1.
If the inputs are 1 and 1 then the output is 1.
The Boolean "NOT" operator yields the following results:
If the input is 0 then the output is 1.
If the input is 1 then the output is 0.
An XOR gate (the X stands for eXclusive) can be created by connecting other
types of gates together in a circuit that yields the following results:
If the inputs are 0 and 0 then the output is 0.
If the inputs are 0 and 1 then the output is 1.
If the inputs are 1 and 0 then the output is 1.
If the inputs are 1 and 1 then the output is 0.