You are on page 1of 63

Basic Terminology

Computer
A device that accepts input, processes data, stores data, and produces output, all according to a series of stored instructions. Software
A computer program that tells the computer how to perform particular tasks.

Network
Two or more computers and other devices that are connected, for the purpose of sharing data and programs.

Hardware
Includes the electronic and mechanical devices that process the data; refers to the computer as well as peripheral devices.

Peripheral devices
Used to expand the computers input, output and storage capabilities.

Brief History
From ENIAC (Electronic Numerical Integrator and Computer) John Mauchly and John P Eckert, University of Pennsylvania (1943 - 1946) For war purposes, ballistic trajectory Weighted 30 tons, consumes 140 kwatts of electric power, 15.000 square feet of space, only 5000 addition per second Not a digital computer, it was a decimal computer (analog) John von Neuman proposed : EDVAC (Electronic Discrete Variable Computer) - first stored program computer -1945 1946 Von Neuman and his gang proposed IAS (Institute for Advanced Studies)

ENIAC

ENIAC

IAS

2.1. Evolution - History of Commercial


computers First Generation : 1950 Mauchly & Eckert developed UNIVAC I, used by Census Beureau Then appeared UNIVAC II, and later grew to UNIVAC 1100 series (1103, 1104,1105,1106,1108) - vacuum tubes and later transistor Second Generation : Transistors, IBM 7094 (although there are NCR, RCA and others tried to develop their versions - commercially not successful) Third Generation : Integrated Circuit (IC) - SSI. IBM S/360 was the successful example Later generations (possibly fourth and fifth) : LSI and VLSI technology

4th Generation Computers 1971-Present: Microprocessors

Miniaturization took over


From SSI (10-100 components per chip) to MSI (100-1000), LSI (1,000-10,000), VLSI (10,000+)

Thousands of ICs were built onto a single silicon chip(VLSI), which allowed Intel, in 1971, to
create the worlds first microprocessor, the 4004, which was a fully functional, 4-bit system that ran at 108KHz.

2.1. Evolution - history of commercial computers


Table 2.1

Approx Speed Generation Time Technology opr/sec) -------------------------------------------------------------------------1. 1946-57 Vacuum tube 40,000 2. 1958-64 Transistor 200,000 3. 1965-71 SSI & MSI 1,000,000 4. 1972-77 LSI 10,000,000 5. 1978VLSI 100,000,000 --------------------------------------------------------------------------

Functional Units
ARITHMETIC AND LOGIC INPUT OUTPUT

CONTROL

Processor

MEMORY

Figure. Basic functional units of a computer.

INPUT UNIT:
Converts the external world data to a binary format, which can be understood by CPU Eg: Keyboard, Mouse, Joystick etc

OUTPUT UNIT:
Converts the binary format data to a format that a common man can understand Eg: Monitor, Printer, LCD, LED etc

Store programs and data Two classes of storage Primary storage (RAM, SRAM and DRAM)
Fast Programs must be stored in memory while they are being executed Temporary memory-data lost when power gone Higher cost

Memory Unit

Secondary storage larger and cheaper(store house)


Stores bulk of programs and databases. Floppy disk, hard disk and Magnetic tape,CD,etc

Central Processing Unit (CPU)


Control unit+ ALU Brain of computer
Perform all calculations Takes all decisions Control all units Eg:-Intel Pentium

Arithmetic and Logic Unit (ALU)


Most computer operations are executed in ALU of the processor. Load the operands into memory bring them to the processor perform operation in ALU store the result back to memory or retain in the processor. Registers Fast control of ALU

Control Unit
All computer operations are controlled by the control unit. The timing signals that govern the I/O transfers are also generated by the control unit. Control unit is usually distributed throughout the machine instead of standing alone. Operations of a computer:
Accept information in the form of programs and data through an input unit and store it in the memory Fetch the information stored in the memory, under program control, into an ALU, where the information is processed Output the processed information through an output unit Control all activities inside the machine through a control unit

Framework

Framework

Get instructio n from memory

Framework

Get instructio n from memory

Read from register file

Framework

Get instructio n from memory

Read from register file

Use ALU

Framework

Get instructio n from memory

Read from register file

Use ALU

Access memory

Framework

Get instructio n from memory

Read from register file

Use ALU

Access memory

Write register file

What *exactly* is memory?


Interface:
reads:
input output Address Data contained in address Address & Data to place in address None

writes:
input output

Variation
Multi-ported
May read or write multiple items at the same time Must add inputs / outputs

ALU DATAPATH and CONTROL


Processors Datapath Control unit Datapath-collection of units-memory, program counter, registers, Arithmetic logic unit, and control unit. Control unit-how data flows through datapath. Memory unit:
holds data and instructions Various locations-specific address Store and give data to datalines in response to address given by address lines and control signals. Read and write signals

ALU DATAPATH and CONTROL


Address Address Address lines Locations

0006
0005 0004 Data lines

Write signal

0003 0002 0001 Data saved

Read signal

MEMORY UNIT

ALU DATAPATH and CONTROL


Registers
Temporary high speed memory. Store instructions, data, results. General purpose Registers(GPRs)-data/address Instruction register
instruction pointer Holds address of current or next instruction Incremented after each fetching

Program counter (PC)

ALU DATAPATH and CONTROL


Control unit
Flow of information Generates control signals
Code from control unit (Control signals)

ALU control, memory write, memory read, input read, output write, etc.

ALU

Operands

Arithmetic and logical operation Output Integer arithmetic add, subtract etc.) Bitwise logic operations (AND,OR, NOT, XOR) Bit shifting operations

Working of ALU based on Datapath and control


Write(2) Write(1) Write(0) Register(2) Register(1) Register(0) Read(2) Read(2) Read(2)

Memory hierarchy

Memory Hierarchy
Memory Hierarchy- comparing cost and performance Response time, cost and size 4 major storage levels
Internal-processor registers, cache Main- RAM Secondary storage-online Tertiary offline storage

Top level-CPUs General purpose registers


Fast access Small size Expensive

Memory Hierarchy

Level one cache


size small, but greater than CPU reg. Level two and level three caches

Main memory
Low cost, general purpose (RAM)

Secondary Solid state memory


Cheaper, large in size

Virtual memory
Work like main memory, hard disk, slower, low cost

Cache memory
Cache
very high speed memory used by CPU to reduce the average time to access memory smaller, faster memory which stores copies of the data Read or write from cache if copy present-faster

If requested data in cache- cache hit -faster Otherwise- cache miss -access from original memory-slower

Cache memory
Cache- small Based on the principle locality of reference
Same value or place where it is stored is accessed often Temporal locality-at one point of time a particular memory accessed- likely that same location referenced again in near future Spatial locality -if one memory accessed at a time, likely that nearby memory loc. referenced in near future. so store a copy of data in nearby loc. to cache

Cache memory- Bookshelf analogy


College libraryhard disk Your book shelf- main memory Your study table- cache memory Easiness of access Book shelf (main) easier than college shelf (hard disk) Study table (cache) easier than book shelf Temporal locality- one book in bookshelf used again and again in nearby time, so keep on study table Spatial locality- more books in book shelf may b used, better to keep on study table

Main memory
Working memory of CPU Random Access Memory Read Only Memory RAM-main memory
Constructed from ICs Need electrical power to maintain data Volatile memory Access time nanoseconds. RAM divided into two-SRAM,DRAM

SRAM
Flipflops-storage Data unchanged unless new data entered

DRAM
Capacitors-storage Data changes due to charge leakage Refresh storage elements periodically

ROM
Permanent storage Non-volatile-data retains even after power down (off) Quick and accurate Data cant be altered

PROM
Already programmed or blanked state Program entered externally Never be altered Unique purpose programming Mistakes cannot be corrected

EPROM
Purchased blank or programmed one Can be erased if needed Data/ programs retrieved several times Reprogram- erase data by a UV light burst Erased and mistakes corrected Can add improvements in program

EEPROM-electrically erasable PROM


Erased and programmed by electric current No need to remove from computer for programming

Secondary memory
No direct access by CPU Computer uses I/O channels to access Non-volatile Hard disk drives Time taken to access data-few milliseconds Optical storage-CD,DVD drives, USB, floppydisks, magnetic tapes etc.

Operating system uses hard disk space acting like main memory-Creates the illusion that more memory exists than is available in system Main memory as a cache for secondary storage To extend the size of physical memory If a program is large, divide into segments Active segments in main memory Inactive segments in secondary memory If not in main memory, copied from secondary storage New segment replaces non using segment in main memory OS swaps segments btw main and secondary memory Called virtual memory

Virtual memory

Virtual memory
Memory Management Unit (MMU) controls virtual memory Managed both in hardware (MMU) and the software (The operating systems) CPU generates the logical address Two types of addresses in virtual memory systems Virtual addresses
Referenced by processes

Physical addresses
Describes locations in main memory (real)

Memory management unit (MMU)


Translates virtual addresses to physical address

Advantages of Virtual Memory Simplified addressing scheme: the programmer does not need to bother about the exact locations of variables/instructions in the physical memory. It is taken care of by the operating system. For a programmer, a large virtual memory will be available, even for a limited physical memory. Simplified access control

Operating system
Program acts as interface btw user and hardware Collection of programs coordinates h/w and s/w, regulates the way user communicates Microsoft windows, Mac OS X, Linux, Android Important part of OS- kernel
Controls low level process How memory read/written Order of execution How info received and sent by i/p o/p devices

User interface- allow user to control and use programs


Graphical (icons) or text based(command line) Windows and MS-DOS

Operating system

Application programming interface- set of services and programs, let apps interact OS takes control of system-direct to h/w
Stays in background

Provides channels of communications to application programs

Classification of OS
Based on user interface- GUI,TUI Based on number of users the computer can supporttime sharing OS OS divides the working time of CPU for the users

Operating system
Multiprocessing OS is similar to a time sharing OS except more than one CPU available Time sharing OS- allows resources (CPU, applications etc.)to be shared among several jobs(Supercomputer) Batch processing OS- jobs by sequence of control statements in machine readable form
Industries

Real-time OS-respond quickly to external world signals -Aeroplane

Operating systems
MS-DOS-16 bit, command line interface WINDOWS- 32 BIT-GUI OS/2-32 bit UNIX-multiuser, multitasking OS
Scientific research, engineering etc.

LINUX- stable OS

Hierarchical relation btw H/W,S/W and User


User
Application programs

Utility programs

OS
Computer Hardware

Functions of OS
Starting the computer: boot program
Diagnostic programs-for primary memory Attached system devices Prepare computer to normal working mode

Running application programs: Steps


1. 2. 3. 4. OS accepts user command reads from secondary memory to RAM OS give control to application to execute Control restored to OS when program ends

Running utility programs:


Give user control over various features of computer Resident utility pgms- in RAM (INPUT MONITORING
PROGRAMS)

Transient pgm- read into RAM upon request (FILE


COPYING PROGRAM)

Managing files:
information organized into files Need to organize these

Programming concepts
Computer programming
Skill of writing useful, maintainable, extensible instructions by computing system to perform a meaningful task High level or low level (machine)languages Written in programming language Computer understand Machine code program-set of binary But difficult for human

Disadv of machine language


Difficult ot understand or debug Entry slow Difficult to remember codes Long programs Errorprone Preferred for less computations only

Assembly language
Use meaningful words-mnemonics (ADD,SUB etc) Unique program for each processor

Advantages
Faster execution Easy to understand and debug

Disadv of ALP
Skilled programmer required Not portable program Lengthier Preferred for medium computations only

High level languages- similar to grammatical languages-English BASIC, FORTRAN, COBOL, PASCAL,C, etc.
Operation oriented rather than computer oriented- user friendly Portable- no need for knowledge of CPU

Advantages of HLP:
Instructions very clear Easier, faster- to write Portable Not CPU oriented Universal language- easier to document Preferred for large computations

Limitations
Thorough idea about rules of language Lower execution speed More h/w, s/w support Costlier as features increases

MICROPROCESSOR
All functions of CXPU in an IC Intel 4004-4 bit IC- first mp
ROM,DRAM, I/O devices, 4 bit CPU

Intel 8008-8 bit mp Intel 8085- popular mp

8085 Microprocessor
Features of 8085 No: of data lines Word length No: of address lines Operating frequency Supply voltage Technology No: of pins

8 8 bit 16 3.125MHz 5V NMOS 40

Organization of 8085
Register section- temperory storage ALU- h/w for computations Interface section-communicates to outside Timing and control section- coordinating and controlling various activities

Architecture of 8085

Description of Architecture of 8085


Registers
6 GPRs - 8 bit-B,C,D,E,H and L 16 bit- Reg pairs- BC,DE, HL one accumulator, one flag reg. 2 16-bit reg- Stack pointer and program counter

Accumulator-A
8-bit, part of ALU Store data to perform operations Store result of operation

Program counter(PC)
16-bit -instruction sequencing Memory pointer-16 bit address Sequence execution Points to memory address from which next instruction to be fetched One byte fetched, PC incremented by one to point to next

Stack pointer (SP)


16-bit- memory pointer Points location in main memory-stack Stack to store current status of microprocessor

Instruction register/Decoder
Temporarily stores current instruction of program Decoder interprets instruction- converts to machine code

Timing and control unit


Provide clock signals-maintain timing inside mp Control unit generate signals to carryout instruction Connection btw blocks open /closed

Arithmetic logic unit


Takes data from memory/GPRs and accumulator 1.Arithmetic: Addition, subtraction, increment, decrement, compare 2. Logical : AND,OR,EXOR,NOT,SHIFT/ROTATE, CLEAR

Flag register
5 flip flops- set or reset after an operation Zero(Z), Carry(CY), Sign(S), Parity (P), Auxiliary Carry (AC) flags Accumulator+ Flag register Program Status Word (PSW)

You might also like