Professional Documents
Culture Documents
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
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.
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
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
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
Framework
Framework
Use ALU
Framework
Use ALU
Access memory
Framework
Use ALU
Access memory
writes:
input output
Variation
Multi-ported
May read or write multiple items at the same time Must add inputs / outputs
0006
0005 0004 Data lines
Write signal
Read signal
MEMORY UNIT
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
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
Memory Hierarchy
Main memory
Low cost, general purpose (RAM)
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
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
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)
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
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
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
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
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
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
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
8085 Microprocessor
Features of 8085 No: of data lines Word length No: of address lines Operating frequency Supply voltage Technology No: of pins
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
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
Instruction register/Decoder
Temporarily stores current instruction of program Decoder interprets instruction- converts to machine code
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)