Intro. CS Chapter 1
Intro. CS Chapter 1
1. INTRODUCTION TO COMPUTERS
Objective:
• Define the discipline computer science
• Define the term computer
•Identify the several characteristics of computer that made them useful and
popular
• Application of Computers
• Complexity theory: concerned with the study and analysis of algorithms, which
helps in measuring the efficiency of the algorithms.
A computer is an electronic device that accepts data, performs computations, and makes
logical decisions according to instructions that have been given to it; then produces
meaningful information in a form that is useful to humans.
The word ‘computer’ comes from the word ‘compute’, which means to calculate. So a
computer is considered to be a calculating device that can perform arithmetic operations
at enormous speed.
More accurately, a computer may be defined as a device that operates upon data.
a) Computes are large electronic machines that can manipulate data in the
desired way by executing a detailed set of instructions called programs.
Figure 1.1 The input process, and output functions of a computer system.
Beyond calculating numbers, today, computers are used to store and manage large
amount of information in the form of words, numbers, pictures and sounds.
We have all heard stories of primitive peoples counting their sheep by moving sticks or
stones. Our base ten number system undoubtedly grew from the use of 10 fingers as
counting objects. Together with the development of people, the need to calculate and
keep track of information had become popular issue. So they soon develop a simple
computing device and had a power of storing small information. However, many
thousands of years elapsed before developing mechanical calculator.
Some of the calculating devises are mentioned bellow:
a) The Abacus
It is one of the earliest mechanical computational devices. It was in use in the Middle
East as early as 2500 BC The familiar Chinese abacus ( dating approximately 1200 AD )
is composed of a frame and a number of wires. The wires correspond to position of digits
in decimal number-units, tens, hundreds, and so on-and the beads represent digits. Beads
above the cross bar represent 5 and those bellow ,1.
The abacus shows zero, if all the bead bellow the cross bar are at the lower frame and
above are at the upper frame.
Addition of two numbers on the abacus can be performed by representing the first
number and the second number without resetting the first. On any wire showing 10 or
more, the two beads above the cross bar are moved back, and an extra 1 (the Cary) is
added two the wire on the left. This process can be easily generalized to addition and
subtraction of more than two numbers.
B) Pascal’s calculator
- The mill: An arithmetic unit capable of performing the four basic arithmetic
operations. It operated on pairs of mechanical registers and produced a result
stored in another register, all of which were located in the store.
- Operation cards: These cards selected one of the four arithmetic operations by
activating the mill to perform the selected function.
- Variable cards: These cards selected the memory locations to be used by the mill
for a particular operation (a source of operand and the destination of the
result).
- Out put: was to print or a card punch device.
But finally the design halt largely due to the technology of the day is not far enough too
supply the required raw materials.
Herman Hollerith was a statistician that in 1880 and develop his machine commissioned
by the U.S. Census Bureau to develop a technique for speeding up the processing of
census data that took at least 8 years before. He develops his machine that uses the
4
E) Mark I: Developed by Howard Aiken at Harvard university (1944) which were the
one first electromechanical computer. Instruction were provided by means of punched
paper tape, which combined the functions of Babbage’s operation cards and variable
cards. Each instruction had the format
A1 A2 OP where
A1 and A2 are registers storing the operands
OP is the operation to be performed ( e.g. +,-,x,÷)
Mark I could do a single addition in 6 seconds and division in 12 seconds
Developed by Eckert and Mauchly at the university of Pennsylvania. This was the first
electronic calculator and first general purpose digital computer. This machine was
enormous, weighing 30 tones. occupying 15,000 square feet of floor space and containing
over 18,000 vacuum tubes. When operating, it consumed over 140 kWh of power. It had
a capability of performing 5,000 addition per second. Its memory consisted of 20
“accumulators” each capable of holding a 10 digit decimal number. Each digit was
represented by a ring of 10 vacuum tubes. At any time, only one of the 10 tubes was in
ON state, representing one of the 10 digits.
➢ ENIAC did not use internally stored programs. Programs were wired on
boards similar to a telephone switch board.
The task of entering and altering programs for the ENIAC was extremely tedious. Von
Neumann was the consultant on the ENIAC project and forward the stored program
concept, i.e designing the computer to get its instruction by reading them from memory
alongside the data and a program could be set or altered by setting the values of a portion
of a memory. Based on this concept, the first true electronic computers were developed
by the name EDVAC (electronic Discrete Variable Computer) and EDSAC( Electronic Delay
Storage Automatic Computer).
G) Commercial Computers
The 1950s saw the birth of computers industry with two companies, Spery and IBM,
dominating the market place. In 1947, Eckert and Mauchly develop their successful
commercial computer called UNIVAC I (Universal Automatic Computer ) .
UNIVAC was division of Remington Rand (later Sperry_Rand Corporation).
IBM also the major manufacturer of punched card processing equipment ,delivered its
first electronic stored program computer, the IBM 701, in 1953.
• Transistors were the main circuit components. (Transistors are a solid state device
made from silicon which is smaller, cheaper, faster, dissipate less energy and
more reliable than vacuum tube but work in the same way with the vacuum tube.)
• Magnetic tapes (similar with home tape caste), used for main storage,
• Business applications become more commonplace, with large data files stored on
magnetic tape and disk. (Magnetic disk: is a circular platter constructed of metal
or plastic materials coated with magnetically substance.)
• High-level languages COBOL and FORTRAN were introduced during this period.
Batch operating systems are used that permitted rapid processing of magnetic tape
files.
1. Storage
Computes can handle large amount of data. Once recorded, information can never be
forgotten and can be retrieved with a fraction of a second.
Its storage capacity is measured as follows:
Bit = smallest information stored in a computer (0 or 1).
• Byte = character = 8 bits.
• Kilobyte (KB) = 1024 bytes.
• Megabyte (MB) = 1024 Kilobytes.
• Gigabyte (GB) = 1024 Megabytes.
• Terabyte (TB) = 1024 Gigabytes.
Computers are very fast devices. They work at an incredible speed and perform millions
of calculations and comparisons in a second.
Its speed is measured by:
Millisecond = 1/1000 of a second.
Microsecond = 1/1000,000 of a second.
Nanosecond = 1/1000,000,000 of a second.
Pico second = 1/1000,000,000,000 of a second.
3 Accuracy
Computers are very accurate. They process vast amount of data in a very high speed
without committing errors. However, the computer is capable of doing what is instructed
to do. If the input data is correct and program instructions are reliable, then the output of
a computer is accurate.
Errors can occur mainly due to humans’ incorrect input data, and program instructions
with a problem. Computer errors caused due to incorrect input data or unreliable program
is often called garbage-in-garbage out (GIGO).
4 Diligence
Computers are not bored or become tired of performing many thousands of calculations
repeatedly. Human beings suffer from weakness like tiredness, lack of concentration,
become sad, depressed, bored and negligent; and it will reflect on the work they do.
Moreover, humans can not perform similar tasks over and over, again and again with the
same precision and accuracy.
Being a machine, computers are not getting tired or bored, not loose concentration etc.
They perform the tasks given to them irrespective of whether it is interesting, creative,
monotonous, boring, irrespective of whether it is the first time or the millionth time with
exactly the same accuracy and speed.
5 Versatility
One of the most wonderful things about the computer is its versatility. A computer is
capable of performing almost any task provided that the task can be reduced to a series of
logical steps.
10
Computers are durable and extremely reliable devices. They can operate error-free over
long periods of time.
7 Lack of decision-making.
Computers do not have the capacity to think on their own. They lack human intelligence,
and only we impose them artificial intelligence. Their I. Q is zero and they had to be told
what to do and in what sequence. Hence, only a user can determine what tasks a
computer can perform. A computer cannot take its own decision in this regard.
2. Digital Computers
Digital computers deal with discrete variables; they operate by counting rather
than measuring. They operate directly up on numbers (or digits) that represent numbers,
letters, or other special symbols.
Examples:
• Abacus
• Desk & pocket computers
• The general purpose computers
Digital computers have higher accuracy and speed than the analog ones.
11
The best features of analog and digital computers can be combined into a
single device to form a hybrid computer. A hybrid computer processes the information by
collecting input data with analog method, convert it into digital quantities, processes the
digital values and convert the output from digital to analog form.
Example:
• In hospital insensitive-care unit analog devices may measure a patient’s
heart function, temperature and other vital signs. These measurements
may then be converted into numbers and supplied to a digital component
in the system. This component is used to monitor the patient’s vital signs
and to send an immediate signal to the nurse’s station. If any abnormal
readings are detected.
Computers can be applied or used for different purposes. Based upon their application,
they are classified as special purpose or general-purpose computers
They are designed to solve a single type of problem, that is their components and
function are uniquely adapted to a specific situation involving specific application.
Example:
• The public telephone box
• Traffic control system
• Ticket machines (used in grocery, super market etc.)
• Pocket calculators etc.
• Counters
2. General-purpose computers
They are designed to solve variety of problems through the use of “store program
concept”. A program or set of instructions designed to solve a problem is read and stored
into the memory and then executed by the computer one by one. The same computer can
be applied to solve another set of problem using different program. General purpose
computers are more flexible and versatile.
Examples
12
1 Supercomputers
Supercomputers are the largest, most powerful, fast and most expensive computers
available at a given time. Their storage capacity is extremely high, and has computing
speeds several times faster than mainframe computers.
They are primarily used for processing complex scientific applications that require
enormous processing power.
They can operate or process data and instructions at speeds measured in nanoseconds and
even in picoseconds. Most supercomputers are used by government agencies. They are
for applications requiring very large programs and huge amount of data that must be
processed quickly.
Mainframe computers are large computers frequently used in large organizations. Some
organizations like banks, insurance companies, hospitals, railways & airline reservation
etc, need to process large number of transactions online and require computer system
having massive data storage and processing power. Mainframe computers are computer
systems mainly handling the bulk of data and information processing of such
organizations.
They are also used in an environment where a large number of users need to share a
common computing facility. They are housed in a central location with several user
terminal connected to them. Mainframes are large, room size computers, usually housed
13
The main difference between a mainframe and a super computer is that a super computer
channels all its power into executing a few programs as fast as possible, where as a
mainframe uses its power to execute many programs concurrently.
3. Minicomputers
Minicomputers are general purpose computers who’s CPU are contained on a single
board or a few boards. Minis are large and more powerful than micros. Minicomputers
are used with a wide variety of input-output devices and more memory and storage
capacity. Minis can be accessed by more than one user at a time and are used in many
application areas.
4. Microcomputers
Yet another type of microcomputers is known as portable computers which are further
classified as laptop, notebook, and personal digital assistant (PDAs). As the name
implies, portable computers can be easily carried around making it easier to use a
computer anywhere.
14
Today computes can find a role in nearly every aspect of our lives. In our every day
activities they can help us get things done better and faster, making humans’ life simple
and easy.
The following are some of the capability of Computers, which are reasons to use
Computers.
➢ Store and process large amount of information with high speed and accuracy;
➢ Transmit information across continents via communication channels;
➢ Simulate events;
➢ Perform complex mathematical computations and make comparisons;
➢ Monitor ongoing industrial operations;
➢ Perform repetitive processes with great ease, speed, and reliability;
IN MANUFACTURING
Computers can be used in production process, from the design stage to the
manufacturing stage.
CAD- Computer-Aided Design
CAM- Computer-Aided Manufacturing.
IN BUSINESS:-
Computers are used to record sales, maintain information about inventories,
payroll records, generate paychecks, and advertise goods or products.
IN RESEARCH
Computers use to analyze and process data. E.g. EPI, SPSS.
Artificial Intelligence (AI) are computer programs that utilize special programming
routines that make decisions based on available evidence rather than hard and fast rules.
The computers have the capability to learn from past events. These programs are
expected to give computers new capabilities for understanding the human voice and for
interpreting users’ natural language responses to programs.
16