You are on page 1of 81

Topic 1

Structure of Computer
Hardware and Software

- CSP107 (Computer Organization) -

1
Contents
1.1 Concept of Digital Computer
1.2 Types of Software - System Software /
1.3 Application Software / Utility Software
1.4 Compilers, Interpreters, Assemblers, Linker,
1.5 Loader

CSP107 (Computer Organization) 2


CSP107 (Computer Organization) 3
Computer Organization
1. Computer Organization
• The dynamic interaction between the computers
• How hardware components operate
• How the hardware components are connected
together to from computer system.
2. Computer Design
• What hardware should be used.
• How should they be connected.
3. Computer Architecture (CA)
• Various functional modules such as processors and
memories.
• Structuring all these modules together to from a
computer system.
CSP107 (Computer Organization) 4
Computer Architecture

Two types:
1.Von-Neumann Architecture
2.Harvard Architecture

CSP107 (Computer Organization) 5


Von-Neumann Architecture

Von-Neumann
Architecture

CSP107 (Computer Organization) 6


Von-Neumann Architecture
•All computers more or less based on the
same basic design, the Von Neumann
Architecture.

CSP107 (Computer Organization) 7


Von-Neumann Architecture
• Model for designing and building
computers, based on the following three
characteristics:
1) The computer consists of four main sub-
systems:
• Memory
• ALU (Arithmetic/Logic Unit)
• Control Unit
• Input/Output System (I/O)
2) Program is stored in memory during execution.
3) Program instructions are executed sequentially.

CSP107 (Computer Organization) 8


CSP107 (Computer Organization) 9
The Harvard Architecture
• Harvard Architecture is a computer architecture with
physically separate storage and signal pathways for
instructions and data.
• The term originated from the Harvard Mark I relay-
based computer, which stored instructions on punched
tape (24 bits wide) and data in electro-mechanical
counters (23 digits wide).
• These early machines had limited data storage,
entirely contained within the data processing unit, and
provided no access to the instruction storage as data,
making loading and modifying programs an entirely
offline process.

CSP107 (Computer Organization) 10


The Harvard Architecture
• In a computer with a Von-Neumann Architecture (and
no cache), the CPU can be either reading an
instruction or reading/writing data from/to the memory.
- Both cannot occur at the same time since the
instructions and data use the same bus system.
• In a computer using the Harvard architecture, the CPU
can read both an instruction and perform a data
memory access at the same time, even without a
cache.
• A Harvard Architecture computer can thus be faster for
a given circuit complexity because instruction fetches
and data access do not contend for a single memory
pathway.

CSP107 (Computer Organization) 11


The Harvard Architecture
• In a Harvard Architecture, there is no need to make
the two memories share characteristics. In
particular, the word width, timing, implementation
technology, and memory address structure can
differ.
• In some systems, instructions can be stored in read-
only memory while data memory generally requires
read-write memory.
• Instruction memory is often wider than data memory

CSP107 (Computer Organization) 12


The Harvard Architecture

CSP107 (Computer Organization) 13


Generation of Computers
1. First Generation (1946-1959)
• vacuum tubes as the basic components for memory
and circuitry for CPU (Central Processing Unit).
The main features of First Generation are:
• Vacuum tube technology
• Unreliable
• Supported Machine language only
• Very costly
• Generate lot of heat
• Slow Input/Output device
• Huge size, Need of A.C.
• Non-portable
• Consumed lot of electricity
CSP107 (Computer Organization) 14
Some computers of this generation were:
• ENIAC
• EDVAC
• UNIVAC
• IBM-701
• IBM-650 CSP107 (Computer Organization) 15
2. Second Generation (1959-1965)
The main features of Second Generation are:
• Use of transistors
• Reliable as compared to First generation computers
• Smaller size as compared to First generation
computers
• Generate less heat as compared to First generation
computers
• Consumed less electricity as compared to First
generation computers
• Faster than first generation computers
• Still very costly
• A.C. needed
• Support machine and assembly languages
CSP107 (Computer Organization) 16
2. Second Generation (1959-1965)

Some computers of this generation were:


• IBM 1620
• IBM 7094
• CDC 1604
• CDC 3600
• UNIVAC 1108
CSP107 (Computer Organization) 17
3. Third Generation (1965-1971)
The main features of Third Generation are:
• IC used
• More reliable
• Smaller size
• Generate less heat
• Faster
• Lesser maintenance
• Still costly
• A.C. needed
• Consumed lesser electricity
• Support high-level language

CSP107 (Computer Organization) 18


Some computers of this generation were:
• IBM-360 series
• Honeywell-6000 series
• PDP(Personal Data Processor)
• IBM-370/168
• TDC-316
CSP107 (Computer Organization) 19
4. Fourth Generation (1971-1980)
The main features of Fourth Generation are:
• VLSI technology used
• Very cheap
• Portable and reliable
• Use of PC's
• Very small size
• Pipeline processing
• No A.C. needed
• Concept of internet was introduced
• Great developments in the fields of networks
• Computers became easily available

CSP107 (Computer Organization) 20


4. Fourth Generation (1971-1980)

Some computers of this generation were:


• DEC 10
• STAR 1000
• PDP 11
• CRAY-1 (Super Computer)
CSP107 (Computer Organization) 21
5. Fifth Generation (1980-till date)
The main features of Fifth Generation are:
• ULSI technology
• Development of true artificial intelligence
• Development of Natural language processing
• Advancement in Parallel Processing
• Advancement in Superconductor technology
• More user friendly interfaces with multimedia features
• Availability of very powerful and compact computers at
cheaper rates

CSP107 (Computer Organization) 22


5. Fifth Generation (1980-till date)

Some computers types of this


generation are:
• Desktop
• Laptop

• NoteBook

• UltraBook

• ChromeBook

CSP107 (Computer Organization) 23


Digital Computer
• Digital computer, any of a class of devices capable of
solving problems by processing information in discrete
form.
• It operates on data, including magnitudes, letters, and
symbols, that are expressed in binary form i.e., using
only the two digits 0 and 1.
• A digital computer can perform such tasks as to control
industrial processes and regulate the operations of
machines;
• analyze and organize vast amounts of business data;
and simulate the behavior of dynamic systems
Example - global weather patterns and chemical
reactions in scientific research.
CSP107 (Computer Organization) 24
Characteristics of Computer
1. Automatic:
• These machines are automatic.
• Once properly started, they can perform task without
any human intervention.
• This makes these devices immensely helpful in
carrying out tedious tasks which may tire normal
human brain.

CSP107 (Computer Organization) 25


Characteristics of Computer
2. Speed:
• Digital computers are discrete systems and operate
in discontinuous steps.
• However the speed of operation is very high. They
can carry out trillions of operations in a second.

CSP107 (Computer Organization) 26


Characteristics of Computer
3. Accuracy:
•A Digital computer stores the information in encoded
form which guarantees its longevity and accurate
retrieval.

CSP107 (Computer Organization) 27


Characteristics of Computer
4. Flexibility:
• These computers are versatile in a sense that they can
carry out different type of jobs at a time without any
interference.
• They modify their behaviour based on the information
they process.

CSP107 (Computer Organization) 28


Characteristics of Computer
5. Memory:
• It can store and recall any amount of information
because of its secondary storage facility. The
information can be stored and retrieved as long as a
user desires. This seldom happens in case of a hum
brain.
• To sum it all a digital computer can work speedily,
accurately and with all diligence without getting tired.

CSP107 (Computer Organization) 29


Types of Computer

CSP107 (Computer Organization) 30


Analog Computer
Analog computer measures and answer
the questions by the method of “HOW
MUCH”. The input data is not a
number infect a physical quantity like
tem, pressure, speed, velocity.
• Signals are continuous of (0 to 10 V)

• Accuracy 1% Approximately

• High speed

• Output is continuous

• Time is wasted in transmission time


CSP107 (Computer Organization) 31
Analog Computer

CSP107 (Computer Organization) 32


Digital Computer
Digital computer counts and answer the
questions by the method of “How Many”.
The input data is represented by a number.
These are used for the logical and arithmetic
operations.
• Signals are two level of (0 V or 5 V)

• Accuracy unlimited

• Low speed sequential as well as parallel


processing
• Output is continuous but obtain when
computation is completed.
CSP107 (Computer Organization)33
Micro Computer
Micro computer are the smallest
computer system. There size range
from calculator to desktop size. Its
CPU is microprocessor. It also known
as Grand child Computer.
Application : personal computer, multi-
user system, offices

CSP107 (Computer Organization) 34


Mini Computer
These are also small general purpose
system. They are generally more
powerful and most useful as compared
to micro computer. Mini computer are
also known as mid range computer or
child computer.
Application : departmental systems,
network Servers, work group system

CSP107 (Computer Organization) 35


Mini Computer

CSP107 (Computer Organization) 36


Main Frame Computer
Mainframe computers are those
computers that offer faster processing
and grater storage area. The word
“main frame” comes from the metal
frames. It is also known as Father
computer.
Application - host computer, central
data base server

CSP107 (Computer Organization) 37


Super Computer
•Super computer are those computer which
are designed for scientific job like whether
forecasting and artificial intelligence etc.
They are fastest and expensive. A super
computer contains a number of CPU which
operate in parallel to make it faster. It also
known as grand father computer.

Application - weather forecasting, weapons


research and development
CSP107 (Computer Organization) 38
Super Computer

CSP107 (Computer Organization) 39


Classification of Digital
Computer
• Desktop
• Workstation

• Notebook

• Tablet PC

• Handheld computer

• Smart Phone

CSP107 (Computer Organization) 40


Workstation

CSP107 (Computer Organization) 41


Tablet PC

CSP107 (Computer Organization) 42


Handheld PC (PDA)

CSP107 (Computer Organization) 43


Smart phone

CSP107 (Computer Organization) 44


Components Of Computer System

CSP107 (Computer Organization) 45


CSP107 (Computer Organization) 46
1. Input:
• This is the process of entering data and programs in to the computer
system.
• You should know that computer is an electronic machine like any other
machine which takes as inputs raw data and performs some processing
giving out processed data.
• Therefore, the input unit takes data from us to the computer in an
organized manner for processing.

CSP107 (Computer Organization) 47


CSP107 (Computer Organization) 48
2. Storage:
• The process of saving data and instructions permanently is
known as storage.
• Data has to be fed into the system before the actual
processing starts.
• It is because the processing speed of Central Processing
Unit (CPU) is so fast that the data has to be provided to
CPU with the same speed.
• Therefore the data is first stored in the storage unit for
faster access and processing. This storage unit or the
primary storage of the computer system is designed to do
the above functionality. It provides space for storing data
and instructions.
• The storage unit performs the following major functions:
• All data and instructions are stored here before and after
processing.
CSP107 (Computer Organization) 49
CSP107 (Computer Organization) 50
3. Processing:
• The task of performing operations like arithmetic and
logical operations is called processing.
• The Central Processing Unit (CPU) takes data and
instructions from the storage unit and makes all
sorts of calculations based on the instructions given
and the type of data provided.
• It is then sent back to the storage unit.

CSP107 (Computer Organization) 51


4. Output:
• This is the process of producing results from the data for
getting useful information.
• Similarly the output produced by the computer after
processing must also be kept somewhere inside the
computer before being given to you in human readable form.
• Again the output is also stored inside the computer for
further processing.

CSP107 (Computer Organization) 52


CSP107 (Computer Organization) 53
5. Control: The manner how instructions are executed and
the above operations are performed. Controlling of all
operations like input, processing and output are performed
by control unit. It takes care of step by step processing of all
operations inside the computer.
FUNCTIONAL UNITS
• In order to carry out the operations mentioned in the
previous section the computer allocates the task between
its various functional units. The computer system is divided
into three separate units for its operation. They are
1) arithmetic logical unit
2) control unit.
3) central processing unit.

CSP107 (Computer Organization) 54


Arithmetic Logical Unit (ALU)

• Logical Unit :After you enter data through the input device
it is stored in the primary storage unit. The actual
processing of the data and instruction are performed by
Arithmetic Logical Unit. The major operations performed by
the ALU are addition, subtraction, multiplication, division,
logic and comparison. Data is transferred to ALU from
storage unit when required. After processing the output is
returned back to storage unit for further processing or
getting stored.

CSP107 (Computer Organization) 55


Control Unit (CU)
• Acts like the supervisor seeing that things are done in
proper fashion.
• Control Unit is responsible for co ordinating various
operations using time signal.
• The control unit determines the sequence in which
computer programs and instructions are executed.
• Things like processing of programs stored in the main
memory, interpretation of the instructions and issuing of
signals for other units of the computer to execute them.
• It also acts as a switch board operator when several users
access the computer simultaneously.
• Thereby it coordinates the activities of computer’s
peripheral equipment as they perform the input and
output.
CSP107 (Computer Organization) 56
CSP107 (Computer Organization) 57
Central Processing Unit (CPU)

• The ALU and the CU of a computer system are jointly


known as the central processing unit.
• The brain of any computer system.
• It is just like brain that takes all major decisions, makes
all sorts of calculations and directs different parts of the
computer functions by activating and controlling the
operations.

CSP107 (Computer Organization) 58


Components of Computer System

•A computer system consists of both hardware and


information stored on hardware.
• Information stored on computer hardware is often
called software.
• The hardware components of a computer system
are the electronic and mechanical parts.
• The software components of a computer system
are the data and the computer programs.

CSP107 (Computer Organization) 59


Components of Computer System
•The major hardware components of a computer system are:
• Processor
• Main memory
• Secondary memory
• Input devices
• Output devices

CSP107 (Computer Organization) 60


Components Of Computer System
• For typical desktop computers, the processor, main
memory, secondary memory, power supply, and supporting
hardware are housed in a metal case.
• Many of the components are connected to the main circuit
board of the computer, called the motherboard.
• The power supply supplies power for most of the
components.
• Various input devices (such as the keyboard) and output
devices (such as the monitor) are attached through
connectors at the rear of the case.

CSP107 (Computer Organization) 61


Components Of Computer System

CSP107 (Computer Organization) 62


Components Of Computer System

CSP107 (Computer Organization) 63


Components Of Computer System

CSP107 (Computer Organization) 64


Hardware Vs Software

CSP107 (Computer Organization) 65


Hardware Vs Software

CSP107 (Computer Organization) 66


Hardware Software
Collection of instructions that
enables a user to interact with
the computer. Software is a
Devices that are required
program that enables a
Definition to store and execute (or
computer to perform a specific
run) the software.
task, as opposed to the
physical components of the
system (hardware).
System software, Programming
Input,storage,processing,c
Types software, and Application
ontrol, and output devices.
software.
CD-ROM, monitor, printer, Quickbooks, Adobe Acrobat,
video card, scanners , Winoms-Cs, Internet Explorer ,
Examples label makers, routers , and Microsoft Word , Microsoft
modems. Excel
Hardware starts To deliver its set of
Inter
functioning once software instructions, Software is
dependency
is loaded. installed on hardware.

CSP107 (Computer Organization) 67


Hardware Software
Hardware failure is
Software failure is systematic.
random. Hardware does
Failure Software does not have an
have increasing failure at
increasing failure rate.
the last stage.
Software does not wear out
Hardware wears out over over time. However, bugs are
Durability
time. discovered in software as time
passes.
Hardware is physical in
Nature nature. Software is logical in nature.

CSP107 (Computer Organization) 68


Types of Software
• Evolution of System Software:
• Two components of program development

and execution cost are:


1.) Cost of the computer system
2.) The manpower cost
• To measure the optimal effectiveness above

two factors should be weighed against each


other

CSP107 (Computer Organization) 69


• First step in the evolution of system software was the
development of a language translator
• In the early days , program had to be written in the
machine language
• Translators for the low level programming language
were termed as assemblers
• And such low level languages were called Assembly
Language
• Though the assembly language permitted easy
writing but still it was highly machine dependent.

CSP107 (Computer Organization) 70


• The complexities associated with the use of
assembly language led to the evolution of machine
independent programming languages
• These languages were termed high level languages
• Called as HLL because they required only a
programmer to specify logic for writing a program

CSP107 (Computer Organization) 71


System Software:
• It is a program required to coordinate all activities
of computer system.
• System software is a collection of programs which are
executed as needed to perform following functions:
• Receiving and interpreting user commands
• Entering ,editing and storing the Application program in
secondary storage
• Managing the storage and retrieve files from disk
• Running the applications as desired by the user
• Controlling I/O units for inputting data and displaying
result
• Linking and loading the desired Library routines

CSP107 (Computer Organization) 72


•A system program is one which is required for the
effective execution of a general user program
• Execution includes all activities concerned with the
initial input of the program and various stages of its
processing by computer system
• Such as editing storage, translation, relocation,
linking,and eventual execution

CSP107 (Computer Organization) 73


Application Software
• Written in high level language
• Used by programmer for writing computer instructions
• Used to solve a specific problem or does a specific task
• Application software allows user to do things like creating
text documents,playinggames,Listeningto music or surfing
the web
• Provides user-oriented or output-oriented functionality
• e.g. Tally, Turbo C

CSP107 (Computer Organization) 74


Utility Software
• It is a kind of system software designed to help ,analyze
,configure optimize and maintain computer
• A single piece of utility software is usually called a utility or
tool
• It is used with application software
• It usually focuses on how the computer infrastructure
operates
• Most of the operating systems come with several
preinstalled utilities
• e.g. Disk Storage Utilities, Disk Defragmenter, Disk Checker,
Disk Cleaners, Disk Space Analyzers, Backup Utilities, Disk
Compression

CSP107 (Computer Organization) 75


Compiler
• Convert user programs written in high level language into a
machine understandable format by reading complete
program as input and produces assembled program as
output
Interpreter
• Convert user program written in high level language into
system program by reading line by line complete program
as input and produces assembled program as output.
• Converts a high level code into m/c instructions line by
line
Assembler
• Converts assembly language program in to machine
language equivalent

CSP107 (Computer Organization) 76


Linker
• A special program whose main purpose is to join together
a number of relocatablemodules which have been loaded
into memory .
• Relocatablemodule is the one which needs to be relocated
before it can be used.
• e.g. Linking Library files

Loader
• A special program whose purpose is to load other
programs or modules into memory
• e.g. Drivers

CSP107 (Computer Organization) 77


STEPS INVOLVED IN COMPILATION
Preprocessing:
• During the preprocessing stage, comments, macros,
and directives are processed.
Lexical Analysis:
• Also called scanning

• It involves examining source program from left to


right ,character by character and grouping them into
tokens having collective meaning
• Breaking down the source files into keywords,
constants, identifiers, operators ,Tokens
• The output of this phase goes to the next phase
CSP107 (Computer Organization) 78
TASKS PERFORMED DURING LEXICAL
ANALYSIS
• All comments ,tabs, blanksspaces and machine
characters are removed
• Error messages occur in a source program are
produced
Syntactical Analysis:
• The process of combining the tokens into

• well-formed expressions, statements, and


programs.
• Checks whether the expression is syntactically
correct or not
CSP107 (Computer Organization) 79
Semantic Analysis:
• Process of examining the data types and values of the
statements used to make sure they make sense.
• An important component of semantic analysis is type
checking
• Here the compiler checks that each operator has operands
that are permitted by the source language specification
Code Optimization:
• The compiler analyzes the code to see if improvements can
be made
• for e.gby making use of pointers when accessing arrays
Code Generator:
• After the code is optimized code generator generates the
machine code or object code and finally linker links all the
object modules to generate the executable code
CSP107 (Computer Organization) 80
CSP107 (Computer Organization) 81

You might also like