basics concepts and cpu architecture 1

Upload: nandita-awasthi

Post on 06-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    1/66

    1Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    2/66

    Computer------------

    The word compute. It means to calculate.

    Mathematical Operations: Addition, subtraction,multiplication, etc. and many other formulae for calculations.

    But complex calculations take much longer time.

    Accuracy in calculations.

    So man explored with the idea to develop a machine which can

    perform this type of arithmetic calculation faster and with fullaccuracy.

    This gave birth to a device or machine called computer.

    2Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    3/66

    WHAT IS A COMPUTER?

    Computer is an electronic device. It can do arithmeticcalculations faster.

    Computer serves different purpose to different people. Fora common man computer is simply a calculator, which

    works automatic and quite fast. For a person who knowsmuch about it, computer is a machine capable of solving

    problems and manipulating data. It accepts data, processes the data by doing some

    mathematical and logical operations and gives us thedesired output.

    Therefore, we may define computer as a device thattransforms data.

    Data can be:- name, age, gender, weight, height, etc. of allthe students in your class or income, savings, investments,

    etc., of a country. 3Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    4/66

    What are the Different Purposes of

    Computers??

    Class Assignment:-

    Make a list of different purposes of Computers?

    4Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    5/66

    Purpose of Computers..

    Computer can be defined in terms of its functions.

    1. Accept data

    2. Store data,3. Process data as desired,

    4. Retrieve the stored data as and when required

    5. Print the result in desired format.

    5Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    6/66

    CHARACTERISTICS OF COMPUTER

    These can be discussed under the headings of

    Speed

    Accuracy

    DiligenceVersatility

    Memory.

    No IQ

    No Feeling Storage

    6Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    7/66

    HISTORY OF COMPUTER

    We will briefly discuss some of the path-breakinginventions in the field of computing devices.

    7Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

    f

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    8/66

    1. Calculating MachinesIt took over generations for early man to build mechanical devices for counting large

    numbers. The first calculating device called ABACUS was developed by theEgyptian and Chinese people.

    2. Napiers BonesEnglish mathematician John Napier built a mechanical device for the purpose of

    multiplication in 1617 A D. The device was known as Napiers bones.

    3. Slide RuleEnglish mathematician Edmund Gunter developed the slide rule. This machinecould perform operations like addition, subtraction, multiplication, and division.It was widely used in Europe in 16th century.

    4. Pascal's Adding and Subtractory Machine

    You might have heard the name of Blaise Pascal. He developed a machine at the ageof 19 that could add and subtract. The machine consisted of wheels, gears andcylinders.

    5. Leibnizs Multiplication and Dividing MachineThe German philosopher and mathematician Gottfried Leibniz built around 1673 a

    mechanical device that could both multiply and divide.

    History of Computers....

    8Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

    i f

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    9/66

    6. Babbages Analytical EngineIt was in the year 1823 that a famous English man Charles Babbage

    built a mechanical machine to do complex mathematicalcalculations. It was called difference engine. Later he developed a

    general-purpose calculating machine called analytical engine.You should know that Charles Babbage is called the father ofcomputer.

    7. Mechanical and Electrical CalculatorIn the beginning of 19th century the mechanical calculator wasdeveloped to perform all sorts of mathematical calculations. Upto the 1960s it was widely used. Later the rotating part ofmechanical calculator was replaced by electric motor. So it wascalled the electrical calculator.

    8. Modern Electronic CalculatorThe electronic calculator used in 1960 s was run with electron

    tubes, which was quite bulky. Later it was replaced withtransistors and as a result the size of calculators became toosmall.

    History of Computers....

    9Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    10/66

    COMPUTER GENERATIONSThis period, during which the evolution of

    computer took place, can be divided into five

    distinct phases known as Generations ofComputers. Each phase is distinguishedfrom others on the basis of the type of

    switching circuits used.

    10Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    11/66

    First generation computers used Thermion valves. These computers were large insize and writing programs on them was difficult. Some of the computers of this

    generation were: ENIAC: It was the first electronic computer built in 1946 at University of

    Pennsylvania, USA by John Eckert and John Mauchy. It was named ElectronicNumerical Integrator and Calculator (ENIAC). The ENIAC was 30 50 feetlong, weighed 30 tons, contained 18,000 vacuum tubes, 70,000 registers, 10,000capacitors and required 150,000 watts of electricity. Today your favorite

    computer is many times as powerful as ENIAC, still size is very small. EDVAC: It stands for Electronic Discrete Variable Automatic Computer and

    was developed in 1950. The concept of storing data and instructions inside thecomputer was introduced here. This allowed much faster operation since thecomputer had rapid access to both data and instructions. The other advantagesof storing instruction was that computer could do logical decision internally.

    Other Important Computers of First Generation

    EDSAC: It stands for Electronic Delay Storage Automatic Computer and wasdeveloped by M.V. Wilkes at Cambridge University in 1949.

    UNIVAC-1: Ecker and Mauchly produced it in 1951 by Universal AccountingComputer setup.

    First Generation Computers

    11Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    12/66

    Limitations..Limitations of First Generation Computer :Followings

    are the major drawbacks of First generation computers.

    1. The operating speed was quite slow. 2. Power consumption was very high.

    3. It required large space for installation.

    4. The programming capability was quite low.

    12Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    13/66

    Second Generation Computers.. Around 1955 a device called Transistor replaced the bulky electric

    tubes in the first generation computer. Transistors are smaller

    than electric tubes and have higher operating speed. They have nofilament and require no heating. Manufacturing cost was alsovery low. Thus the size of the computer got reduced considerably.

    It is in the second generation that the concept of Central

    Processing Unit (CPU), memory, programming language andinput and output units were developed. The programminglanguages such as COBOL, FORTRAN were developed duringthis period. Some of the computers of the Second Generation

    were

    IBM 1620: Its size was smaller as compared to First Generationcomputers and mostly used for scientific purpose.

    IBM 1401: Its size was small to medium and used for businessapplications.

    CDC 3600: Its size was large and is used for scientific purposes. 13Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    14/66

    Third Generation Computers

    The third generation computers were introduced in

    1964. They used Integrated Circuits (ICs). These ICsare popularly known as Chips. A single IC has manytransistors, registers and capacitors built on a singlethin slice of silicon. So it is quite obvious that the size

    of the computer got further reduced. Some of thecomputers developed during this period were IBM-360,ICL-1900, IBM-370, and VAX-750. Higher levellanguage such as BASIC (Beginners All purpose

    Symbolic Instruction Code) was developed during thisperiod.

    Computers of this generations were small in size, lowcost, large memory and processing speed is very high.

    14Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    15/66

    Fourth Generation Computers

    The present day computers that you see today are thefourth generation computers that started around 1975. Ituses large scale Integrated Circuits (LSIC) built on a singlesilicon chip calledmicroprocessors. Due to thedevelopment of microprocessor it is possible to placecomputers central processing unit (CPU) on single chip.These computers are called microcomputers. Later verylarge scale Integrated Circuits (VLSIC) replaced LSICs.

    Thus the computer which was occupying a very large room

    in earlier days can now be placed on a table. The personalcomputer (PC) that you see in your school is a FourthGeneration Computer.

    15Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    16/66

    Fifth Generation Computer

    The computers of 1990s are said to be Fifth Generationcomputers. The speed is extremely high in fifthgeneration computer. Apart from this it can perform

    parallel processing. The concept of Artificialintelligence has been introduced to allow the computerto take its own decision. It is still in a developmentalstage.

    16Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    17/66

    TYPES OF COMPUTERSAlthough they belong to the fifth generation they can

    be divided into different categories depending uponthe size, efficiency, memory and number of users.Broadly they can be divided it to the followingcategories.

    17Basics of Computers & Architecture by Sumanta BiswasFriday, May 04, 2012

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    18/66

    1. Microcomputer: Microcomputer is at the lowest end of the computer

    range in terms of speed and storage capacity. Its CPU isa microprocessor. The first microcomputers were builtof 8-bit microprocessor chips. The most commonapplication of personal computers (PC) is in thiscategory. The PC supports a number of input andoutput devices. An improvement of 8-bit chip is 16-bit

    and 32-bit chips. Examples of microcomputer are IBMPC, PC-AT .

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 18

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    19/66

    2. Mini Computer:

    This is designed to support more than one user at a

    time. It possesses large storage capacity and operatesat a higher speed. The mini computer is used in multi-user system in which various users can work at thesame time. This type of computer is generally used for

    processing large volume of data in an organisation.They are also used as servers in Local Area Networks(LAN).

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 19

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    20/66

    3. Mainframes:

    These types of computers are generally 32-bitmicroprocessors. They operate at very high speed, havevery large storage capacity and can handle the workload of many users. They are generally used incentralised databases. They are also used as controllingnodes in Wide Area Networks (WAN). Example ofmainframes are DEC, ICL and IBM 3000 series.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 20

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    21/66

    4. Supercomputer:

    They are the fastest and most expensive machines. Theyhave high processing speed compared to other computers.They have also multiprocessing technique. One of the waysin which supercomputers are built is by interconnectinghundreds of microprocessors. Supercomputers are mainlybeing used for whether forecasting, biomedical research,remote sensing, aircraft design and other areas of scienceand technology. Examples of supercomputers are CRAY

    YMP, CRAY2, NEC SX-3, CRAY XMP and PARAM fromIndia.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 21

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    22/66

    Assignment(Home Work)

    Prepare a list of examples of all different type of

    Computers

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 22

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    23/66

    BASIC COMPUTER OPERATIONS

    A computer as shown in Fig. performs basicallyfive major operationsor functions irrespective of their size and make. These are 1) It acceptsdata or instructions by way of input, 2) It stores data, 3) It canprocess data as required by the user, 4) It gives results in the formof output, and 5) It controls all operations inside a computer.Wediscuss below each of these operations.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 23

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    24/66

    Different Operations..

    1. Input: This is the process of entering data and programs in to the

    computer system. Computer is an electronic machine like any othermachine which takes as inputs raw data and performs some processinggiving out processed data. Therefore, the input unit takes data from us tothe computer in an organized manner for processing.

    2. Storage: The process of saving data and instructions permanently is

    known as storage. Data has to be fed into the system before the actualprocessing starts. It is because the processing speed of Central ProcessingUnit (CPU) is so fast that the data has to be provided to CPU with thesame speed. Therefore the data is first stored in the storage unit for fasteraccess and processing. This storage unit or the primary storage of the

    computer system is designed to do the above functionality. It providesspace for storing data and instructions.

    The storage unit performs the following major functions:

    All data and instructions are stored here before and after processing.

    Intermediate results of processing are also stored here.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 24

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    25/66

    3. Processing: The task of performing operations like arithmeticand logical operations is called processing. The Central Processing Unit

    (CPU) takes data and instructions from the storage unit and makes allsorts of calculations based on the instructions given and the type ofdata provided. It is then sent back to the storage unit.

    4. Output: This is the process of producing results from the data for

    getting useful information. Similarly the output produced by thecomputer after processing must also be kept somewhere inside thecomputer before being given to you in human readable form. Again theoutput is also stored inside the computer for further processing.

    5. Control: The manner how instructions are executed and the aboveoperations are performed. Controlling of all operations like input,processing and output are performed by control unit. It takes care ofstep by step processing of all operations in side the computer.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 25

    Different Operations..

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    26/66

    FUNCTIONAL UNITS

    In order to carry out the operations mentioned in theprevious section the computer allocates the taskbetween its various functional units. The computersystem is divided into three separate units for its

    operation. They are1. Arithmetic Logical Unit,

    2. Control Unit, and

    3. Central Processing Unit.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 26

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    27/66

    Arithmetic Logical Unit (ALU)

    After you enter data through the input device

    it is stored in the primary storage unit. Theactual processing of the data and instructionare performed by Arithmetic Logical Unit.

    The major operations performed by the ALUare addition, subtraction, multiplication,division, logic and comparison. Data is

    transferred to ALU from storage unit whenrequired. After processing the output isreturned back to storage unit for furtherprocessing or getting stored.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 27

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    28/66

    Control Unit (CU)

    The next component of computer is the Control Unit, which

    acts like the supervisor seeing that things are done in properfashion. The control unit determines the sequence in whichcomputer programs and instructions are executed. Thingslike processing of programs stored in the main memory,

    interpretation of the instructions and issuing of signals forother units of the computer to execute them. It also acts as aswitch board operator when several users access thecomputer simultaneously. Thereby it coordinates theactivities of computers peripheral equipment as theyperform the input and output. Therefore it is the manager ofall operations mentioned in the previous section.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 28

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    29/66

    Central Processing Unit (CPU)

    The ALU and the CU of a computer system are jointlyknown as the central processing unit. You may callCPU as the brain of any computer system. It is just like

    brain that takes all major decisions, makes all sorts ofcalculations and directs different parts of the computerfunctions by activating and controlling the operations.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 29

    MEMORY SYSTEM IN A COMPUTER

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    30/66

    MEMORY SYSTEM IN A COMPUTER

    There are two kinds of computer memory:

    Primary and Secondary.

    Computer memory is used to store twothings:

    i) Instructions to execute a program and

    ii) Data.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 30

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    31/66

    Primary memory is accessible directly by the

    processing unit. RAM is an example of primarymemory. As soon as the computer is switched offthe contents of the primary memory is lost. You

    can store and retrieve data much faster withprimary memory compared to secondarymemory. Secondary memory such as floppydisks, magnetic disk, etc., is located outside thecomputer. Primary memory is more expensivethan secondary memory. The size of primarymemory is less than that of secondary memory.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 31

    Primary Memory.

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    32/66

    When the computer is doing any job, thedata that have to be processed are stored inthe primary memory. This data may come

    from an input device like keyboard or from asecondary storage device like a floppy disk.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 32

    Primary Memory.

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    33/66

    As program or the set of instructions is kept inprimary memory, the computer is able to followinstantly the set of instructions. For example,when you book ticket from railway reservation

    counter, the computer has to follow the samesteps: take the request, check the availability ofseats, calculate fare, wait for money to be paid,

    store the reservation and get the ticket printedout. The programme containing these steps iskept in memory of the computer and isfollowed for each request.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 33

    Primary Memory.

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    34/66

    Different types of Memory.

    Random Access Memory (RAM): The primary storage

    is referred to as random access memory (RAM) becauseit is possible to randomly select and use any location ofthe memory directly store and retrieve data. It takessame time to any address of the memory as the first

    address. It is also called read/write memory. The storageof data and instructions inside the primary storage istemporary. It disappears from RAM as soon as the powerto the computer is switched off. The memories, which

    loose their content on failure of power supply, are knownas volatile memories .So now we can say that RAM isvolatile memory.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 34

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    35/66

    Read Only Memory (ROM):

    It is the ICs inside the PC that form the ROM. Thestorage of program and data in the ROM is permanent.The ROM stores some standard processing programssupplied by the manufacturers to operate the personal

    computer. The ROM can only be read by the CPU butit cannot be changed. The basic input/output programis stored in the ROM that examines and initializesvarious equipment attached to the PC when the switch

    is made ON. The memories, which do not loose theircontent on failure of power supply,

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 35

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    36/66

    PROM: There is another type of primary memory

    in computer, which is called Programmable Read

    Only Memory (PROM).

    You know that it is not possible to modify or erase

    programs stored in ROM, but it is possible for youto store your program in PROM chip. Once theprogrammes are written it cannot be changed andremain intact even if power is switched off.

    Therefore programs or instructions written inPROM or ROM cannot be erased or changed.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 36

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    37/66

    EPROM:(Erasable Programmable Read

    Only Memory)

    EPROM: This over come the problem of PROM & ROM.EPROM chip can be programmed time and again by

    erasing the information stored earlier in it. Informationstored in EPROM exposing the chip for some timeultraviolet light and it erases chip is reprogrammed usinga special programming facility. When the EPROM is in

    use information can only be read.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 37

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    38/66

    Cache Memory: Cache Memory: The speed of CPU is extremely high

    compared to the access time of main memory. Therefore theperformance of CPU decreases due to the slow speed ofmain memory. To decrease the mismatch in operatingspeed, a small memory chip is attached between CPU andMain memory whose access time is very close to the

    processing speed of CPU. It is called CACHE memory.CACHE memories are accessed much faster thanconventional RAM. It is used to store programs or datacurrently being executed or temporary data frequently used

    by the CPU. So each memory makes main memory to befaster and larger than it really is. It is also very expensive tohave bigger size of cache memory and its size is normallykept small.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 38

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    39/66

    Registers:

    Registers: The CPU processes data andinstructions with high speed, there is alsomovement of data between various units ofcomputer. It is necessary to transfer the processed

    data with high speed. So the computer uses anumber of special memory units called registers.They are not part of the main memory but they

    store data or information temporarily and pass iton as directed by the control unit.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 39

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    40/66

    SECONDARY STORAGE Magnetic Tape:

    Magnetic Disk:

    Floppy Disk:

    Optical Disk:

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 40

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    41/66

    Optical Disk: Optical disks can be divided into the following categories:

    1. Compact Disk/ Read Only Memory (CD-ROM): CD-ROM disks aremade of reflective metals. CD-ROM is written during the process ofmanufacturing by high power laser beam. Here the storage density is veryhigh, storage cost is very low and access time is relatively fast. Each diskis approximately 4 1/2 inches in diameter and can hold over 600 MB ofdata. As the CD-ROM can be read only we cannot write or make changesinto the data contained in it.

    2. Write Once, Read Many (WORM): The inconvenience that we can notwrite any thing in to a CD-ROM is avoided in WORM. A WORM allowsthe user to write data permanently on to the disk. Once the data iswritten it can never be erased without physically damaging the disk. Here

    data can be recorded from keyboard, video scanner, OCR equipment andother devices. The advantage of WORM is that it can store vast amountof data amounting to gigabytes (109 bytes). Any document in a WORMcan be accessed very fast, say less than 30 seconds.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 41

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    42/66

    3. Erasable Optical Disk: These are optical disks wheredata can be written, erased and re-written. This alsoapplies a laser beam to write and re-write the data.

    These disks may be used as alternatives to traditionaldisks. Erasable optical disks are based on a technologyknown as magnetic optical (MO). To write a data bit onto the erasable optical disk the MO drive's laser beam

    heats a tiny, precisely defined point on the disk'ssurface and magnetises it.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 42

    Optical Disk:

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    43/66

    INPUT OUTPUT DEVICES Keyboard: - This is the standard input device attached to all

    computers. The layout of keyboard is just like the traditionaltypewriter of the type QWERTY. It also contains some extracommand keys and function keys. It contains a total of 101 to 104keys. You have to press correct combination of keys to inputdata. The computer can recognise the electrical signals

    corresponding to the correct key combination and processing isdone accordingly.

    Mouse: - Mouse is an input device shown in Fig. 2.7 that is usedwith your personal computer. It rolls on a small ball/optical

    device and has two or three buttons on the top. When you rollthe mouse across a flat surface the screen censors the mouse inthe direction of mouse movement. The cursor moves very fast

    with mouse giving you more freedom to work in any direction.

    It is easier and faster to move through a mouse.Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 43

    S

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    44/66

    Scanner:Scanner: Scanner is an optical device that can input any graphical matter and

    display it back. The common optical scanner devices are Magnetic InkCharacter Recognition (MICR), Optical Mark Reader (OMR) and OpticalCharacter Reader (OCR).

    Magnetic Ink Character Recognition (MICR): - This is widely used by banks toprocess large volumes of cheques and drafts. Cheques are put inside the MICR. Asthey enter the reading unit the cheques pass through the magnetic field whichcauses the read head to recognise the character of the cheques.

    Optical Mark Reader (OMR): This technique is used when students haveappeared in objective type tests and they had to mark their answer by darkening asquare or circular space by pencil. These answer sheets are directly fed to a computerfor grading where OMR is used.

    Optical Character Recognition (OCR): - This technique unites the direct readingof any printed character. Suppose you have a set of hand written characters on apiece of paper. You put it inside the scanner of the computer. This pattern iscompared with a site of patterns stored inside the computer. Whichever pattern ismatched is called a character read. Patterns that cannot be identified are rejected.OCRs are expensive though better the MICR.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 44

    O t t D i

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    45/66

    Output Devices

    Visual Display Unit: The most popular input/output deviceis the Visual Display Unit (VDU). It is also called the monitor.

    A monitor has its own box which is separated from the maincomputer system and is connected to the computer by cable.In some systems it is compact with the system unit. It can beColor or Monochrome.

    2. Terminals: It is a very popular interactive input-outputunit. It can be divided into two types: hard copy terminalsand soft copy terminals. A hard copy terminal provides a

    printout on paper whereas soft copy terminals provide visual

    copy on monitor. A terminal when connected to a CPU sendsinstructions directly to the computer. Terminals are alsoclassified as Dumb Terminals or Intelligent Terminalsdepending upon the work situation.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 45

    O t t D i

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    46/66

    Printer: It is an important output device which can beused to get a printed copy of the processed text or result

    on paper. There are different types of printers that aredesigned for different types of applications. Dependingon their speed and approach of printing, printersare classified as Impact and Non-Impact printers.

    Impact printers use the familiar typewriter approach ofhammering a typeface against the paper and inkedribbon. Dot-matrix printers are of this type. Non-impact

    printers do not hit or impact a ribbon to print. They use

    electro-static chemicals and ink-jet technologies.Laser printers and Ink-jetprinters are of this type. Thistype of printers can produce color printing and elaborate

    graphics.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 46

    Output Devices

    Section -3

    S

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    47/66

    Section 3

    WHAT IS SOFTWARE?

    Computer cannot do anything without instructions fromthe user. In order to do any specific job you have to givea sequence of instructions to the computer. This set ofinstructions is called a computerprogram.

    Software refers to the set of computer programs,procedures that describe the programs, howthey are to be used.

    We can say that it is the collection of programs, which

    increase the capabilities of the hardware. Softwareguides the computer at every step where to start and stopduring a particular job. The process of softwaredevelopment is called programming.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 47

    Software

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    48/66

    SOFTWARE TYPES

    Computer software is normally classified into two broadcategories.

    Application SoftwareSystem Software

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 48

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    49/66

    Application Software:

    Application Software is a set of programs to carry out

    operations for a specific application. For example, payroll isan application software for an organization to produce payslips as an output. Application software is useful for wordprocessing, billing system, accounting, producing statisticalreport, analysis of numerous data in research, weather

    forecasting, etc. In later modules you will learn about MSWORD, Lotus 1-2-3 and dBASE III Plus. All these areapplication softwares.

    Another example of application software is programming

    language. Among the programming languages COBOL(Common Business Oriented Language) is more suitable forbusiness application whereas FORTRAN (FormulaTranslation) is useful for scientific application.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 49

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    50/66

    Assignment:-

    Make a list of Application Software.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 50

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    51/66

    System Software:You know that an instruction is a set of

    programs that has to be fed to the computerfor operation of computer system as a whole.When you switch on the computer the

    programs written in ROM is executed whichactivates different units of your computer andmakes it ready for you to work on it. This set ofprogram can be called system software.Therefore system software may be defined as aset of one or more programs designed tocontrol the operation of computer system.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 51

    System Software contd....

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    52/66

    System software are general programs designed

    for performing tasks such as controlling alloperations required to move data into and out ofthe computer. It communicates with printers,card reader, disk, tapes etc. monitor the use of

    various hardware like memory, CPU etc. Alsosystem software are essential for the developmentof applications software. System Software allows

    application packages to be run on the computerwith less time and effort. Remember that it isnot possible to run application software

    without system software.Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 52

    y

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    53/66

    Computer manufactures build and supply this systemsoftware with the computer system. DOS, UNIX andWINDOWS are some of the widely used systemsoftware. Out of these UNIX is a multi-user operating

    system whereas DOS and WINDOWS are PC-based.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 53

    System Software contd....

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    54/66

    Relation Between Hardware & Software

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 54

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    55/66

    Programming Languages

    There are two major types of programminglanguages.

    These are Low Level Languages and HighLevel Languages.

    Low Level languages are further divided in to

    Machine language and Assembly language.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 55

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    56/66

    (a) Machine Language

    Machine Language is the only language that is directlyunderstood by the computer. It does not needs any translatorprogram. We also call it machine code and it is written asstrings of 1's (one) and 0s (zero). When this sequence ofcodes is fed to the computer, it recognizes the codes and

    converts it in to electrical signals needed to run it. Forexample, a program instruction may look like this:

    1011000111101

    It is not an easy language for you to learn because of its

    difficult to understand. It is efficient for the computer butvery inefficient for programmers. It is considered to the firstgeneration language. It is also difficult to debug the program

    written in this language.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 56

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    57/66

    Machine Language contd.....

    Advantage

    The only advantage is that program of machine languagerun very fast because no translation program is requiredfor the CPU.

    Disadvantages

    It is very difficult to program in machine language. Theprogrammer has to know details of hardware to writeprogram.

    The programmer has to remember a lot of codes to writea program which results in program errors.

    It is difficult to debug the program.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 57

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    58/66

    (b) Assembly Language

    It is the first step to improve the programmingstructure. You should know that computer can handlenumbers and letter. Therefore some combination ofletters can be used to substitute for number of machinecodes.

    The set of symbols and letters forms the AssemblyLanguage and a translator program is required to

    translate the Assembly Language to machine language.This translator program is called Assembler'. It isconsidered to be a second-generation language.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 58

    Assembly Language contd...

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    59/66

    Advantages:

    The symbolic programming of Assembly Language is easier to

    understand and saves a lot of time and effort of theprogrammer.

    It is easier to correct errors and modify program instructions.

    Assembly Language has the same efficiency of execution as the

    machine level language. Because this is one-to-one translatorbetween assembly language program and its correspondingmachine language program.

    Disadvantages:

    One of the major disadvantages is that assembly language ismachine dependent. A program written for one computermight not run in other computers with different hardwareconfiguration.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 59

    HIGH LEVEL LANGUAGES

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    60/66

    HIGH LEVEL LANGUAGES You know that assembly language and machine level language require

    deep knowledge of computer hardware where as in higher language you

    have to know only the instructions in English words and logic of theproblem irrespective of the type of computer you are using.

    Higher level languages are simple languages that use English andmathematical symbols like +, -, %, / etc. for its program construction.

    You should know that any higher level language has to be converted to

    machine language for the computer to understand.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 60

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    61/66

    Higher level languages are problem-oriented languagesbecause the instructions are suitable for solving a particularproblem. For example COBOL (Common Business OrientedLanguage) is mostly suitable for business oriented language

    where there is very little processing and huge output. Thereare mathematical oriented languages like FORTRAN

    (Formula Translation) and BASIC (Beginners All-purposeSymbolic Instruction Code) where very large processing isrequired.

    Thus a problem oriented language designed in such a way

    that its instruction may be written more like the language ofthe problem. For example, businessmen use business termand scientists use scientific terms in their respectivelanguages.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 61

    HIGH LEVEL LANGUAGES contd...

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    62/66

    Advantages of High Level Languages Higher level languages have a major advantage

    over machine and assembly languages that higherlevel languages are easy to learn and use. It isbecause that they are similar to the languages usedby us in our day to day life.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 62

    C il

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    63/66

    Compiler It is a program translator that translates the instruction of a

    higher level language to machine language. It is calledcompiler because it compiles machine language instructionsfor every program instructions of higher level language. Thuscompiler is a program translator like assembler but moresophisticated. It scans the entire program first and then

    translates it into machine code. The programs written by the programmer in higher level

    language is called source program. After this program isconverted to machine languages by the compiler it is called

    object program. Higher Level Language --> (Compile) ---> Program -->

    Machine Language Program

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 63

    Compiler contd

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    64/66

    Compiler contd...

    A compiler can translate only those source programs,which have been written, in that language for which thecompiler is meant for. For example FORTRAN compilerwill not compile source code written in COBOL

    language. Object program generated by compiler is machine

    dependent. It means programs compiled for one type ofmachine will not run in another type. Therefore everytype of machine must have its personal compiler for aparticular language. Machine independence is achievedby using one higher level language in differentmachines.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 64

    Interpreter

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    65/66

    p An interpreter is another type of program translator used for

    translating higher level language into machine language. It takes

    one statement of higher level languages, translate it into machinelanguage and immediately execute it. Translation and execution arecarried out for each statement. It differs from compiler, whichtranslate the entire source program into machine code and doesinvolve in its execution.

    The advantage of interpreter compared to compiler is its fastresponse to changes in source program. It eliminates the need for aseparate compilation after changes to each program. Interpretersare easy to write and do not require large memory in computer. Thedisadvantage of interpreter is that it is time consuming method

    because each time a statement in a program is executed then it isfirst translated. Thus compiled machine language program runsmuch faster than an interpreted program.

    Friday, May 04, 2012 Basics of Computers & Architecture by Sumanta Biswas 65

  • 8/3/2019 Basics Concepts and CPU Architecture 1

    66/66

    THANK YOU