Beruflich Dokumente
Kultur Dokumente
COMPUTERS
DO
Prepared by:
John Kenneth E. Etrata
General Purpose Computers vs. Special
Purpose Computers
■ General Purpose computers are
machines that has variety of programs
on them and can do different things
depending on which program we choose
to run.
■ Special Purpose computers are machine
that are designed and programmed to do
a specific task.
■ In our daily life we interact with many
computers directly and indirectly in a
course of most days.
What Computers Do
How do computers do the many things they do?
With so many different applications, such
as mathematical computations, word
processing, games, spreadsheets, surfing
the net, storing music, etc., understanding
how each of these is accomplished looks
like a major task.
However, it's not as complex as it looks.
To further understand what a computer
can do what we need to do is break down
the tasks into its most basic component and
see how each of this components are
accomplished.
Example
A = 2 * 32 + 6/2 – 7
= 2 * 32 + 6/2 - 7
= 2 * (3 * 3) + 6/2 - 7
= 2 * (3 + 3 + 3) + 6/2 - 7
= (3 + 3 + 3) + (3 + 3 + 3) + 6/2 - 7
= (3 + 3 + 3) + (3 + 3 + 3) + 3 + (-7)
Explanation
■ So all the processor really needs to know
how to do is store both positive and
negative numbers (and fractions) and add.
Anything more can be accomplished
through the use of programs. We may also
want to check the computer's answer,
asking it if A = B or to do something if A >
100. Thus the computer also needs a way to
tell if two numbers are equivalent or if one
is larger than another.
Computer Process
■ 1) store all kinds of data, including numbers, text, pictures,
and sound
■ 2) move this data from one storage location to another
■ 3) compare any two pieces of data to determine if they are
equivalent or if one is larger (or later in the alphabet, or
darker, or lower in pitch) than the other
■ 4) add
This is not to say that most computers do not have a larger set
of operations built in, but the four capabilities listed above,
together with input and output are the minimum needed to have a
functioning computer. Understanding how these operations
happen will be enough to get a basic idea of how computers
work.
Programs and Algorithms
■ Since no general purpose computer has all the operations
one would wish for hard-wired into its circuitry, we also need
some way for the computer to execute more complicated
processes.
■ This is accomplished through the use of SOFTWARE this are
programs that are stored in the computer and run as needed.
■ Computer programs are formal representations of methods
for performing computations. The programs themselves are
written in a code or programming language that can be
understood by the computer. Since computers can only do
exactly what they are told to do, these programs must be
both detailed and well organized. Every program is based on
a method for computing the desired result called an
algorithm.
Definition of an algorithm:
1) it consists of a list of steps that complete a task
2) each step is precisely defined and appropriate for the machine
for which the algorithm is designed
3) the number of steps is finite
4) the process terminates after a finite number of steps are
executed
Suppose, for example, you wished to program a computer
to add the numbers from one to ten and print the result.
One possible algorithm for this process would be the
following:
■ Example:
1) begin with sum = 0 and x = 1
2) add x to sum
3) add 1 to x
4) if x < 11 go back to step 2
5) print the sum
6) stop
Are Computers Intelligent?
■ Computers are not intelligent. Any intelligence is built into
the design of the algorithms that form the basis of their
programming. Without programs, computers can do only a few
very basic things. Yet computers are extremely powerful.
Their power to do many things comes from two properties.
First, computers are very fast. A complicated program may
break a task into millions, or even billions of steps. However,
a computer can execute each of those steps in nanoseconds,
or billionths of a second. Computers can accomplish in
seconds what it would take a human being hours, days, or even
years to compute.
Continuation.
■ Second, once we have programs to do simple things we can
combine those programs to do more complicated things. From
our set of operations -- storing, moving, comparing and adding
data -- we can build an incredibly diverse variety of programs
using different algorithms. This gives computers their great
flexibility. Any process that uses data or information that
can be symbolized and that can be described by an algorithm
can be accomplished by a computer.
History of Computing