Unit1,2,3
Unit1,2,3
Basic Concepts
What is a computer- meaning, stages of evolution,
generations
Characteristics of a Computer, Advantages and
Limitations.
Basic computer operations and functional units.
Types of Computers- based on data handling technology,
purpose and size
Applications of computers.
Data Representation. Binary number system, conversion
from binary to decimal and vice versa, Computer Codes-
BCD, EBCD, ASCII, ISCII, Unicode.
What Is a Computer?
Programmable electronic device operating under the
control of instructions stored in its own memory
Accepts data
Raw facts, figures, and symbols
Processes data into information
Data that is organized, meaningful, and useful
Produces and stores results
History of the Computers
Key Characteristics
Small, affordable, reliable, and easy to use PCs;
more powerful and reliable mainframe systems and
supercomputers; totally general purpose machines;
easier to produce commercially; easier to upgrade; rapid software
development possible
Some representative systems
IBM PC and its clones, Apple II, TRS80, V AX 9000, CRAY-l,
CRAY-2, CRAY–X/MP
FIFTH GENERATION (1989-PRESENT)
Processor
Input Output
Storage
1. Cache Memory
High speed, expensive piece of memory, which is
used to speed up memory retrieval process
CPU comes with a small amount of cache compared
main memory due to its higher cost
Computer uses logic to determine most frequently
accessed data and keeps them in cache.
Made from high speed static RAM that reduces the
access time of the data
Cache Memory
Categorised into three levels: L1 Cache , L2 Cache and L3 Cache
L1 Cache:
Primary Cache, closest to the processor
Size: 8 to 64 KB or more
Very fast, runs at the speed of the processor since it is integrated into it
L2 Cache:
Larger but slower
Recent accesses not picked by L1 Cache
Size: 64 KB to 2 MB
Also found on CPU
L3 Cache:
Extra cache built into motherboard between the processor and main memory
Speeds up processing operations, reducing time gap b/w request and retrieving of data
and instructions much more quickly than main memory
Size: 3 MB or more
Subsystems of CPU
2. Registers
Special purpose, high speed temporary memory units for holding
data, instructions, addresses, and intermediate results of
calculations
Working memory of CPU, hold the information that CPU is
currently working on
Register Name Function
Program Counter Keeps track of next instruction to be executed
Memory Buffer Register Store data either coming to CPU or data being
transferred by CPU
Data Register Storing operands and other data
Computer Memory
Primary memory Vs. Secondary memory
Primary
RAM & its types- (static Vs. dynamic)
ROM & its types- (PROM, EPROM, EEPROM,
UVPROM, Flash memory)
Cache memory, Registers
Memory
Super Computer
fastest computing devices ever invented
Speed measured in teraflops (1012 FLoating-point Operations Per Sec).
Use Multi processing and parallel processing
consist of thousands of integrated microprocessors, main memory of
around 16 GB and secondary memory 1000 GB
e.g., PARAM 10000, PACE, CRAY, Cyber, IBM Blue Gene
IBM’s Blue Gene installed at Lawrence Livermore National
Laboratory (LLNL) in California operates at 360 teraflops, used to
study cosmology and the behaviour of stellar binary pairs, laser-
plasma interactions, and the behaviour and aging of high explosives.
According to Size
Main Frame Computer
processes several millions of instructions per second
bigger & more expensive than workstations
Used in banks and insurance cos., processing on-line
transactions, ERP, Survey etc.
Large disks to store terabytes of data,
transfer data from disk to main memory at several hundred MB
per sec,
process 100 million transactions per sec.
Proprietary OS
e.g., IBM’s System/390, VAX 8000, CDC 6600
According to Size
Mini Computer
middle sized special purpose computers
used in transaction processing applications
as interface between main frame and WAN,
Serves as a centralised storehouse for a cluster of workstations or
as a network server
Usually multi-user systems, used in industries, research
organisations, colleges & universities
work well with distributed data processing, supports 4 to 200
simultaneous users
VAX 7500, IBM (8000 series), PDP-11.
According to Size
Work Stations
desktop machines having a powerful processor than a micro (10 times speedier than
PC)
Main memory: several GBs
HD: 100s of GB
support multi-user environment
Operating System: UNIX or its derivatives like AIX (IBM), Solaris (SUN), HP-UX
(HP)
a sophisticated screen display featuring a high resolution colour graphics, large
video screens, inbuilt h/w to connect to LAN
meet computing requirements of engineers, architects
Business & industry usage for executing numeric, graphic intensive multimedia
applications s.a. CAD, simulation of complex systems
Also called super micros.
e.g. DEC, IBM, Sun Workstations
According to Size
Micro Computer
Small, low cost digital computer
most familiar kind of computers
Originally designed for single user, when
networked together can serve more than one user
Many uses
these include: desktop, laptop, PDAs
According to Size- Micro computer
Desktop computer
Personal computer, stand-alone use by an individual
Not expensive
Used by individuals and small businesses
MS-Windows, Windows XP, LINUX
Apple Macintosh (Power PC Processor), IBM PCs (Intel
Pentium processor)
According to Size- Micro computer
Portable computers
Laptop/Note Books
combine the power of PC with mobility, powered
with battery.
Weight around 2kg
Keyboard, flat screen LCD
Wireless connectivity to networks
Cost more than Desktop
According to Size- Micro computer
Personal Digital Assistants
PDAs are much smaller than laptops, handheld computer
also known as Palmtop, Simputer
combine pen input (i.e. stylus), writing recognition and
communication capabilities
No hard disk, use small cards to store programs and data
Runs on batteries
Limited processing capabilities and memory
E.g., Palm pilots, Mind Spring, i-Paq, Casio Cassiopeia, Apple
Newton, Franklin eBookMan
According to Role
Server
Large computer, manages shared resources and provides services
to clients
specific purpose such as high performance numerical computing
(called compute server), web page hosting, database store,
printing, etc.
Interactive large screens not necessary as in case of workstations
Compute server: high performance processors, large main
memory
Database server: large on-line disk storage (100s of GB)
Print server: support several high speed printers
May be a workstation, mainframe or even a super computer
According to Role
Client
A single user PC or workstation that provides a highly
user friendly interface to the end user
Runs client processes which sends service request to
server
Network
Interconnects all the clients and servers of the client-
server computing environment
Data Representation
Binary number system & its relevance
Conversion of numbers among
Binary
Octal
Hexadecimal
Decimal
Binary representation of integers and real numbers
Sign and magnitude representation
Complement representation
Performing simple arithmetic on binary numbers
Computer Codes- BCD, EBCD, ASCII, ISCII, Unicode.
DATA REPRESENTATION
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 1010
Converting Binary to Decimal
(a) 101112
the right most bit is called the least significant bit (LSB), its weight is 2 0, i.e.
1.
The next bit on the left side of LSB has a weight of 21, i.e. 2.
The next bit has a weight of 22, i.e. 4, and so on.
Thus, the rightmost bit, which is also called the most significant bit (MSB)
in 10111 has a weight of 24, i.e. 16.
101112
= 1 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + 1 x 20
=1x16+0x8+1x4+1x2+1x1
= 16 + 0 + 4 + 2 + 1 = 2310
(b)101010112
= 1 x 27 + 0 x 26 + 1 x 25 + 0 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 1 x 20
= 1 x 128 + 0 x 64 + 1 x 32 + 0 x 16 + 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1
= 128 + 0 + 32 + 0 + 8 + 0 + 2 + 1
= 17110
Converting Decimal to Binary
Divide decimal number by 2.
Then the result (quotient) is successively divided again
by 2, till it cannot be divided further.
The binary number is obtained by writing the
remainders of these divisions backward.
Convert 4210 into binary number
2 42 Remainder
21 0
10 1
5 0
2 1
1 0
0 1
(42)2= (101010)10
COMPUTER CODES
Commonly used coding systems: BCD, ASCII, EBCDIC, Unicode, etc.
1. Binary-coded decimal (BCD) is a numeral system used in computing
and in electronics systems. In BCD, numbers are represented as a sequence
of decimal digits in which each digit is represented by four bits:
Digit bits Digit bits Digit bits Digit bits Digit bits
To encode a number such as 127, for example, each of the decimal digits
is encoded using the bit pattern shown above, that is: 0001, 0010, 0111.
Most computers store data in eight-bit bytes, so there are two common
ways of storing four-bit BCD digits in those bytes:
Ignore the extra four bits of each byte, usually filling them with either
zero bits or one bits (as in EBCDIC)
Store two digits per byte, called "packed" BCD.
Packed BCD numbers also usually end with a sign 'digit', for which the
preferred values are 1100 for + and 1101 for -.
Thus the number 127 would be represented as (11110001, 11110010,
11110111) in EBCDIC or (00010010, 01111100) in packed BCD.
BCD is wasteful (about 1/6 of the available memory is wasted, even in
packed BCD),
2. EBCDIC (Extended Binary Coded Decimal Interchange Code)
Software Categories:
System Software
1. System Management Program
1. Operating System
2. Device Drivers
3. System Utilities
2. System Development Program
1. Programming Languages
2. Language processors
3. Linkers
4. Loader
Application Software
System Vs. Application software
System Software Application Software
Low level programs that End user programs
interact with computer at User oriented programs that
low level perform specific tasks
Provide basic non-task Controlled by system
specific functions software
Control the operations &
extend processing
capability of computer
system
Application Software
Application software:
1. Word-Processing Software
2. Spreadsheet Software
3. Database Software
4. Graphics Software
5. Personal Assistance Software
6. Education Software
7. Entertainment software
Application software:
a set of one or more programs designed to solve a specific
problem or do a specific task.
e.g. inventory management, preparation of tax return, banking,
hospital administration, insurance.
1. Word-Processing Software
enables the user to create, edit, view, format, store, retrieve
and print documents (written material such as letters, reports,
books, etc.) on a computer system.
2. Spreadsheet Software
a numeric data analysis tool that allows user to create a kind of
computerized ledger.
can hold large information and perform calculation just like
calculator.
3. Database Software
a set of one or more programs that enables users to create a
database, maintain it (add, delete and update its records),
organize its data in desired fashion and to selectively retrieve
useful information from it.
4. Graphics Software
used for creating, editing, viewing, storing, retrieving and
printing designs, drawings, pictures, graphs and anything else
that can be drawn in the traditional manner.
5. Personal Assistance Software
storing and retrieving personal information, planning and
managing schedules, contacts, financial and inventory of
important items
6. Education Software
teaching and learning tool
Black-board, on-line examinations, Authoring tools,
Vocabulary Builder, Mathematics, Geometry, etc
7. Entertainment software
Video games, interactive television, game partner, etc.
Functions of system software
Controls all operations required to move data into and out of a
computer
Supports development & execution of other applications
software
Monitors effective use of various hardware resources- CPU,
Memory & other peripherals
Communicates with & controls operation of I/O devices
System Software
Categories of system software
System Management Programs System Development
Responsible for mgt & accurate Programs
functioning of computer system Associated with development of
Manage operations of processor, Computer program
control I/O, manage storage Allow programmers to write &
resources, provide various support construct programs that OS can
devices execute
Include Include:
1. 1.
1. 1.
1. Process management
2. File and software management
3. I/O and peripherals management
4. Memory management
5. CPU Time management
6. Security management
7. Command interpretation
Operating System Functions
1. Process management:
creation & deletion of processes, scheduling of system
resources, synchronising of processes
1. File and software management:
OS stores & retrieves files of data
supports a large library of typical user programs & files
retrieves the program required by the user from disk and bring it to the
main memory to be used by the operator
2. I/O and peripherals management:
contains peripheral device handlers
configures new devices
Coordination & assignment of different I/O resources while one or more
programs is being executed
Operating System Functions
3. Memory management:
determine how much usable RAM a computer has
decides how this RAM is used
Supervises transfer of data and programs into and out of RAM
4. CPU Time management:
Schedules CPU time so that it can be used effectively
When the CPU is idle (e.g., during I/O operations), the operating
system can give the CPU something to do.
Operating System Functions
5. Security management:
provides security features which enable different users to
protect their files
Enforce security/confidentiality through usernames, passwords,
access rights, etc.
6. Command interpretation:
Interpretation of commands & instructions
Coordination & assignment of compilers, assemblers, utility
program & other s/w to various users of computer system
Types of OS
1. Multiprogramming OS
2. Multitasking OS
3. Multiprocessing OS
4. Multithreading OS
5. Multiuser OS
6. Real time OS
Multiprogramming Operating System
interleaved execution of two or more different and
independent programs by same computer
processor executes each program for a very short
interval of time, say, about 150 milliseconds, & then
executes the next program in the queue
All programs residing in main memory will be in one of
the 3 states: running (using CPU), blocked (I/O
operation being done) & ready (waiting for CPU)
even though many programs may reside in the
computer's memory at the same time, only one program
is being executed (running state) at any given time.
Multiprogramming Operating system
Multiprogramming ensures maximum utilization of
CPU, as its never idle
For multiprogramming to work satisfactorily, large
memories are required.
UNIX, Windows NT, LINUX
Multi tasking Operating System
System’s capability to concurrently work on more
than one task in single user systems
Technically same as multi programming
Term Multi programming is used for multi user
systems
Windows 95, 98, 2000, XP, Vista, Windows7,etc
Multiprocessing operating systems
two or more independent processors are linked together.
the instructions from different programs can be
processed at the same time by different processors
Simultaneous execution of two or more processes
Two types: Tightly coupled (single system wide
primary memory shared by all processors & Loosely
coupled (each processor has own local memory,
geographically scattered)
Multitasking operating system supports two or more
active processes simultaneously in a single user system.
Multiprogramming operating system supports multiple
concurrent process & allows the instruction and data
from two or more separate processes to reside in primary
memory simultaneously.
Multiprogramming implies multiprocessing or
multitasking operation, but multitasking does not imply
multiprogramming.
Multi threading OS
Basic unit of CPU utilization is a thread, also
called light weight process
Each thread of a process share the same address
space, same global variables, same set of OS
resource
Resource sharing is more efficient, lesser
overheads are involved.
At a particular time thread can be in one of 4
states: running, blocked, ready or terminated
Multi-user operating system
allows simultaneous access to a computer system
through two or more terminals
associated with multiprogramming
e.g., dedicated transaction processing system such as
railway reservation system with hundreds of terminals
under control of a single program
Real Time Operating System
Programming Languages
Language Processors
Linkers
Loader
Programming Languages
Meaning of programming language
Types of programming language
Low Level Languages and High Level Languages
Low Level languages-Machine language and Assembly
language.
differentiate between different types of language
giving relative advantages and disadvantages
Language processors
assembler, compiler, interpreter
distinguish between compiler and interpreter
Programming languages
Interface of programmer with a computer
Series of commands which are used in development of s/w
Classification
1. Machine language
First generation language
Understood by computer w/o using translation program
Written as strings of binary 1s & 0s
Converted immediately by computer circuitry into electrical signals
required to execute them
Each model of computer has unique machine language
Advantages: fast execution of programs, no translation required
Used for complex applications s.a. Space control system, nuclear
reactors, chemical processing
Disadvantages: machine dependent, complex language, difficult to
read & understand, error prone, difficult to modify
1.
1. Assembly language
Allows instructions & storage locations to be represented by mnemonics
e.g. ADD, SUB, MLT, etc
Low level language, second generation language, developed by IBM in
1950s
Advantages: easier to understand & use, easier to locate & correct errors,
easier to modify
Limitations: machine dependent, knowledge of h/w required, machine
level coding
2. High level language
Problem oriented instead of machine based
English words & math notation
3GL (COBOL, FORTRAN, BASIC, C), 4GL (SQL, QBE), 5GL(LISP,
ProLog)
Advantages: readability, machine independent, easy debugging, easy
documentation, faster & low cost development of programs
Disadvantages: poor control on h/w, no need for h/w knowledge, less
efficient, more computation time
Programming Language processors
1. Compiler
Converts the entire source program into object code
before program is executed
Reports all errors of programs along with line numbers,
then program is recompiled
Object program made available & compiler is no longer
required memory
e.g. FORTRAN, C, JAVA compilers
Programming Language processors
1. Interpreter
Translate one source instruction into object code &
computer immediately executes that instruction before
moving on to translate next instruction
Longer time for complete execution than compiled
program
Error can be traced exactly
Unnecessary usage of memory, interpreter must be
always present in the memory
e.g. BASIC, LISP are interpreted language
Basis Compiler Interpreter
Object Code Separate object No object code file
code provided Translates source
Translation Converts entire code line wise
process prog into machine Debugging easier
Debugging code at one go Easier to write, less
Implementation Slow debugging complex prog
Complex programs Less memory
Execution More memory required for
required to execute execution
Faster execution as slow execution as
object file saved each statement
translated
Linker
Links compiled module & data files to create an
executable program
Loader
Brings an executable file (code of program) residing on
disk into memory for execution
Automatically invoked during program run
Acquiring software
TOP
EIS
LOWER TPS
Expert Systems
Office Automation System
Type of Information system
Functional point of view- purpose, features and
cycle
Financial and accounting information system
Human resource development and management system
Manufacturing or production information system
Marketing information system
Accounting information systems
record and report business transactions and other
economic events as well as help in producing
financial statements.
Marketing information system
set of procedures and practices employed in
analyzing and assessing marketing information,
gathered continuously from sources inside and
outside of a firm
Information requirement for Planning,
Coordination, and control for various level in
Business, Industry
Basic of data arrangement and Access
Data arrangement and access for specific
information needs
Data access and their usage
Information requirement
Functions of organisation Information requirement Information system required
Operational TPS
Basics of data arrangement and Access