How Computers Work – Course Information



EMMA HS1 Outline Week #2

Review Homework- The Parts That Make Up the Whole

What are all the parts of my computer?

Fundamentals

Video - Current Electricity

Power

AC – Alternating Current

DC – Direct Current

Analog vs. Digital

Frequency

Hertz-Cycles per Second

Kilohertz, Megahertz, Gigahertz

Waveforms & Measurements

AC & DC – Analog/Digital

Digital Volt Meter – Voltage Measurements

Oscilloscope – Digital and Analog Waveforms

Serial Data

0’s and 1’s, 0 Volts and 5 Volts

Graphical Representation of Serial Data

How Computers Process Information

Glossary

Bits & Bytes

Codes & ASCII

Standards

Data Structures

Machine & Computer Languages

Computer Programs

How does a Computer Work with information?

Homework - Online Quizzes

Current Electricity

How Computers Process Information

Handouts - Current Electricity

Analog vs. Digital

ASCII Table

How Computers Process Information

Current Electricity

There are actually two main kinds of current electricity. Direct Current, DC for short, and Alternating Current, or AC.

Direct Current is what you get from things like batteries, fuel cells and solar cells. In Direct Current the flow of electricity always goes in one direction.

The electricity we get through the walls though is Alternating Current. With AC the current goes in one direction and then switches to go the other way. It alternates back and forth. The switching happens really quickly, 60 times a second so we don’t even notice the lights flicker.

Electrical energy is made in power plants. Power plants use generators to turn mechanical energy into electrical energy to make alternating current.

Mechanical energy can come from a bunch of different sources like wind, moving water, and burning fossil fuels.

Either water or wind or steam from burning oil and coal provide the mechanical energy to turn a turbine. The turbine spins a coil through a magnetic field. This generates an electrical current that changes direction as different parts of the coil pass through the field. That’s the Alternating Current.

AC goes from the power plant to a transformer where the voltage is increased so it can travel long distances and not lose much energy.

The high voltage Alternating Current will run along transmission wires. In some places the transmission wires are high above the ground while in others the wires are underground.

Before it enters your home the high voltage current will go through another transformer to decrease the voltage to a safe level. That’s how electricity gets from power plants to our houses.

ANALOG vs. DIGITAL

DIGITAL describes any system based on discontinuous data or events. Computers are digital machines because at their most basic level they can distinguish between just two values, 0 and 1, or off and on. There is no simple way to represent all the values in between, such as 0.25. All data that a computer processes must be encoded digitally, as a series of zeroes and ones.

The opposite of digital is ANALOG. A typical analog device is a clock in which the hands move continuously around the face. Such a clock is capable of indicating every possible time of day. In contrast, a digital clock is capable of representing only a finite number of times (every tenth of a second, for example).

In general, humans experience the world analogically. Vision, for example, is an analog experience because we perceive infinitely smooth gradations of shapes and colors. Most analog events, however, can be simulated digitally. Photographs in newspapers, for instance, consist of an array of dots that are either black or white. From afar, the viewer does not see the dots (the digital form), but only lines and shading, which appear to be continuous. Although digital representations are approximations of analog events, they are useful because they are relatively easy to store and manipulate electronically. The trick is in converting from analog to digital, and back again.

This is the principle behind compact discs (CDs). The music itself exists in an analog form, as waves in the air, but these sounds are then translated into a digital form that is encoded onto the disk. When you play a compact disc, the CD player reads the digital data, translates it back into its original analog form, and sends it to the amplifier and eventually the speakers.

Internally, computers are digital because they consist of discrete units called bits that are either on or off. But by combining many bits in complex ways, computers simulate analog events. In one sense, this is what computer science is all about.

(Excerpt taken from )

[pic]

How Computers Process Information

A. LESSON OBJECTIVE

To learn the basics of how the computer works with binary (digital) information and how it presents information in a form that people can understand and work with.

B. LESSON GLOSSARY

BIT: This is the smallest piece of information stored in a computer. It has only two values, 0 or 1.

BYTE: When 8 bits are joined together they are called a byte. A byte can represent a maximum of 256 different combinations of 0’s and 1’s, starting from 00000000 and ending at 11111111. For example, a byte could contain a bit combination of 00100111 or 10001001.

CODE: A set of signals representing letters, numbers, symbols or other meanings that are used in sending and receiving messages. What underlies every code is an agreement as to what the signals mean by the people who are using the signals. People who know the agreement can communicate back and forth in code. A person who does not know the agreement might detect that some communication is going on but will not understand it or might think something else entirely is being communicated. A well known example of a code is MORSE CODE. Popularized in the 1800’s Morse Code used long pulses (dashes) and short pulses (dots) to send communications long distances via a wire. This form of communication was known as the telegraph.

ASCII CODE: American Standard Code for Information Interchange (ASCII) is a code that defines the binary representation of letters, numbers and symbols that can be printed or displayed. The code uses the 256 different combinations of 0’s and 1’s that can be contained in a byte. Each combination represents a decimal value between 0 and 255 and each decimal value has been assigned a letter, number or symbol. For example, a blank space has the decimal value 32. The dollar sign “$” has the decimal value 36. The numeral 0 has the decimal value 48. The uppercase “A” has the decimal value 65 and the lowercase “a” has the decimal value 97. All letters, symbols, and numbers are collectively referred to as characters and a character occupies one byte of storage. Because this code is agreed upon among computer manufacturers it is possible to transfer data from one computer to another.

STANDARD: This is an agreed upon quantity, measurement, method, or procedure. The purpose of a standard is to establish a level of quality that guarantees the correctness of a measurement, a procedure or a method. Having an established standard allows manufacturers to independently produce products and components, whether hardware or software, that can be integrated into a computer and work as intended. Many different standards have been established in the computer and electronics industry. Standards facilitate (help) communication and understanding between organizations, people and computer components.

STRUCTURE: This is something that is composed of parts that are connected to one another in some fashion. For example, a building is a structure. There are levels of structure inside the building. For example a door in a building has its own structure and the wood used for the door has its own structure. This continues with each structure becoming more and more basic.

|Employee_Structure: | |

|Name: | |

| First_name |char[15] |

| Last_name |char[15] |

|Address: | |

| Street |char[32] |

| City |char[20] |

| State |char[2] |

| Zip |char[10] |

|SS_number |char[11] |

| | |

| | |

| | |

DATA STRUCTURE: This is a structure that is composed of information. The basic building block of the data structure is the BIT. A higher level of data structure is the BYTE (8 bits). Bytes can be joined together to make new data structures.

For example, by joining 30 bytes together a new structure called “name” is created. Data structures can become more complex by joining other data structures to it and thus we get a higher-level data structure. For example, “Employee” is a data structure that consists of a person’s name, followed by street address, city, state, zip, social security number, age and so on. All of the information stored in computer memory

or on a hard drive or a CD-ROM is structured. So, you can understand what all of those 0’s and 1’s in computer memory mean as long as you know the data structure that applies to that part of computer memory! Some data structures have become standards that are now widely used throughout the computer industry.

Sample Data Structure

LANGUAGE: a system of communicating thoughts, ideas, knowledge, and instructions. Human languages make use of symbols to make words. The words connected together in specific ways allow humans to express complete ideas or thoughts to one another. There are many different languages used by humans, for example English, French, German, etc. Nevertheless, behind each language are concepts, ideas and perceptions that all humans share and so as humans we are able to communicate with and understand each other. Using language a person can be given instructions and taught how to do something.

MACHINE LANGAUGE: This is the language that is recognized by the CPU of a computer. With this language computers are ‘told’ exactly what they have to do and how to do it. The instructions given to the computer are very, very detailed. This is also the computer’s native language and this language is made up only of 1’s and 0’s. Machine instructions have a data structure and this data structure is built into the computer’s CPU. Using the data structure, the CPU is able to take 32 bits of data in memory and know that the first 4 bits are the instruction code (0001=jump, 0002=move, 0003=add etc.). The other 28 bits have a structure that is used to tell the CPU the address to jump to for its next instruction, or the address and length of the data in memory to be moved, etc. Writing instructions in machine language is very difficult to do and so other computer languages have been developed to handle this problem.

Machine Instruction Example

|Code |Length |Address From |Address To |

|0010 |010010 |1001011000 |100010000 |

This instruction tells the CPU to MOVE (Code 0010) 18 bytes (Length 010010) from location 610 (Address From 1001011000) to location 543 (Address To 100010000)

COMPUTER LANGAUGES: These are languages that people use to tell a computer what to do and to describe to the computer the data structure(s) of the information to be processed. Many different computer languages exist and these languages have evolved and become more powerful through the years. No matter the language used, the instructions of that language have to be changed or translated down into machine language for the computer to actually be able to carry out the instructions. This is done by a program that comes with the computer language and it is called a Compiler. Some computer languages are BASIC, COBOL, C+ +, Pascal, Visual Basic etc. Computer languages have evolved to the level that with very simple instructions, very complex and detailed actions can be performed by the computer.

COMPUTER PROGRAM: This is a set of instructions that tells the computer how it has to process information. A computer language is used to communicate these instructions to the computer. A computer does not “think”. It only carries out the instructions it has been given. It can be made to look as if a computer is “thinking” but all of the real thinking has been done by the people designing and writing the programs. A computer program once written can be saved to a hard drive or removable storage media. Each time you want to use a certain program the computer is told the name of the program and where it can be found. It is then loaded into memory and the CPU starts carrying out the instructions in that program. You might say, the more programs the computer has available to it, the “smarter” the computer will be.

C: READING: How does the Computer Work with information?

From the definitions you have learned in this lesson you should now have a better idea of how a computer is able to work with information that is merely a collection of 0’s and 1’s. What makes a computer work are the instructions it is given in the form of computer programs and the information that it is fed through a variety of input devices (keyboard, mouse, scanner, etc.)

It is the program that can make sense of the data that is being fed and it is the program that imposes a structure on the information it gets. When a program stores information on disk it is not done in just “any old way” but it is done in a way that it can recognize what it has saved so that it can use this data again. Therefore, data structures in programs are very, very important since without them a computer program just would not be able to work.

When a program is given information intended for another program, that program will not work correctly, because the data structures in the program do not match the structure of the data it is being given.

The use of agreed-upon codes or standards is another reason that computer programs can process information that can be transferred between computers. It is why pictures created on one computer can be shown on another computer. This is why music CDs can be played on your computer as well as on your CD player. This is why different manufacturers can produce sound adapter cards that will work in a PC.

Using ASCII code, a key typed on a keyboard is translated by the keyboard controller chip into a binary value which is then stored in memory. For example, the “A” key gets pressed. According to the ASCII code this has a decimal value of 65 which when translated into binary is 001000001 and this is what gets stored in memory.

If the letter “A” is to be shown on the monitor screen it has to be changed back from its binary value of 001000001 into an image on the screen. This is done by a program that has a mapping of the letter “A” in pixels (picture elements: or the little dots that make up a screen; each letter is formed by a unique pattern of pixels). Depending on where the letter “A” is to appear on the screen, the pixels at that location are then illuminated to form the letter “A”.

Let’s take a look at how it is possible for sound to be processed by computers. Sounds heard by our ears are waves of compressed air of a certain frequency. There are many different waves that combine to give unique sounds. The ear is an input device of the human body.

An electronic input device for sound is the microphone. The sound picked up by the microphone is changed into tiny electrical signals that are sent down a cable to the sound adapter card on a computer. This sound adapter card has a program that translates these tiny electrical impulses into binary information (0’s and 1’s). The information is then structured and stored in a very specific way.

This process is known as encoding or turning a signal into a code. Now, to hear what was recorded requires a program that:

a) knows the code used to record the sound

b) knows the data structure of the recorded sound

c) knows the rules to decode 0’s and 1’s to turn them back into electrical impulses

The impulses can then be sent to the speakers via the sound card to reproduce the sound.

On the PC, sound information is stored in what is known as a WAV file. An audio computer program can read the contents of a WAV file and using the sound adapter card in the computer can generate sound that comes out on the speakers attached to the sound card.

The portable CD player , for example, has its own microprocessor (CPU) with a ROM chip that contains a program to translate the 0’s and 1’s recorded on the CD back into sound signals that are then sent to the headphones.

In summary, most anything that can be sensed by some kind of input device (which is then attached to an electronic circuit) can be translated by a specialized program into binary digits. These binary digits can be translated back into their original form or translated into some other form by a computer program. For example, digital sound can be translated by a computer program into special light effects. The special light effects may be presented on a computer screen or presented to a special electronic device that has staging lights attached to it.

In this age of computers and electronics, creativity and imagination are major driving forces behind the demand to make computers more and more powerful. A computer is a machine to be used, so let your creativity and imagination fly!

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download