first year lecture 1

Upload: ahmed-rabie

Post on 04-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/21/2019 First Year Lecture 1

    1/45

    COMPUTER ORGANIZATION

    Lecture 1

  • 7/21/2019 First Year Lecture 1

    2/45

    Components of a Digital Computer

    A computer system is the integration of

    physical entities called hardareand non-

    physical entities called softare.

    The hardare !omponents include input

    devices, processor, storage devices and

    output devices.

    The softare items are programs and

    operating systems so that the computer can

    process data.

  • 7/21/2019 First Year Lecture 1

    3/45

    Computer Top "e#el $ie

    The %lo!& diagram of !omputer hardare !omponents is

    shon %elo

    'un!tional Units of a Computer ()stem

  • 7/21/2019 First Year Lecture 1

    4/45

    Functional Units of a Computer System

    asically any computer is supposed to carry out the

    follo!ing functions.

    *+ A!!ept the data and program as input+

    ,+ (tore the data and program and retrie#e

    as and hen re-uired+

    .+ Pro!ess the data as per instru!tions

    gi#en %) the program and !on#ert it intouseful information+

    /+ Communi!ate the information as output+

  • 7/21/2019 First Year Lecture 1

    5/45

    Input Unit

    A !omputer uses input de#i!es to a!!ept

    the data and program+

    Input de#i!es allo !ommuni!ation

    %eteen the user and the !omputer+

    In modern !omputers &e)%oard0 mouse0

    light pen0 tou!h s!reen are some of the

    input de#i!es

  • 7/21/2019 First Year Lecture 1

    6/45

    Output Units

    (imilar to input de#i!es0 output de#i!esha#e an interfa!e %eteen the !omputer

    and the user+

    These de#i!es ta&e ma!hine !oded outputresults from the pro!essor and !on#ert

    them into a form that !an %e used %)

    human %eings+ In modern !omputers0 monitors1displa)

    s!reens2 and printersare the !ommonl)

    used output de#i!es+

  • 7/21/2019 First Year Lecture 1

    7/45

    Central Pro!essing Unit

    CPU is the %rainof an) !omputer s)stem+

    It !onsists of arithmeti! and logi! units0

    !ontrol unit and internal memor)

    1registers2+

    Programs 1softare2 pro#ide the CPU0 a set

    of instru!tion to follo and perform a

    spe!ifi! tas&+ 3eteen an) to !omponents of the

    !omputer s)stem0 there is a patha) !alled

    a %us hi!h allos for the data transfer

  • 7/21/2019 First Year Lecture 1

    8/45

    Central Pro!essing Unit

    The fun!tions of the CPU are 4

    *+ Co5ordinate all !omputer operations

    ,+ Perform arithmeti! and logi!al operations on data

  • 7/21/2019 First Year Lecture 1

    9/45

    Central Pro!essing Unit

    Control unit !ontrols all the hardare operationsof input units0 output units0 memor) unit and the

    pro!essor+

    A"Uperform addition0 su%tra!tion0 di#ision and

    multipli!ation as ell as some logi!al operations+

    The instru!tions and data are stored in the main

    memor) so that the pro!essor !an dire!tl) fet!h

    and e6e!utethem+ 7hile performing these operations the A"U ta&es

    data from the temporar) storage area inside the

    CPU named registers+

  • 7/21/2019 First Year Lecture 1

    10/45

    'un!tions of a CPU

  • 7/21/2019 First Year Lecture 1

    11/45

    Memor) Unit

    In the main memor)0 the !omputer stores theprogram and data that are !urrentl) %eing used0

    main memor) store the program and data %efore

    pro!essing+

    The main memor) holds data and program onl)

    temporaril)+

    There is a need for storage de#i!es to pro#ide

    %a!&up storage0 the) are !alled se!ondar)storage de#i!es+

    (e!ondar) storage de#i!es !an hold more

    storagethan main memor) and is mu!h less

    e6pensi#e+

  • 7/21/2019 First Year Lecture 1

    12/45

    (tored Program Con!ept

    The essentials of the stored program !on!eptare4

    *+ The program and data are stored in a primar)

    memor),+ The !omputer !an e6e!ute a program

    automati!all)+

    .+ The !ontrol unit fet!hes and e6e!utes the

    instru!tions in se-uen!e one %) one+

    /+ Instru!tion !an modif) the !ontents of an)

    lo!ation in the stored program !on!ept+

  • 7/21/2019 First Year Lecture 1

    13/45

    Understanding the 7or&ing Prin!iples of CPU

    Let us go through the various tas"s involved in

    e#ecuting a simple program.

    $his program performs arithmetic addition on t!o

    num%ers. $he algorithm of this program is given %y

    &. input the #alue of a

    II+ input the #alue of %III+ sum 8 a 9 %

    I$+ output the #alue of sum

  • 7/21/2019 First Year Lecture 1

    14/45

    Program e6e!uting steps

    1. $he control unit %egins to e#ecute the program

    instructions one %y one in a se'uential manner.

    (. $he control unit signals the input device )say

    "ey%oard* to accept the input for the varia%le +a.. $he userenters the value of +aon the "ey%oard.

    . $he control unit recogni/es and ena%les to route the

    data )value of a* to the pre-defined memory location

    )address of +a*.

    0. $he steps (to !ill %e repeated for the second input

    +%. $he value of +%is stored in the memorylocation

    )address of +%*.

  • 7/21/2019 First Year Lecture 1

    15/45

    rogram e#ecuting steps )Cont.*2. efore e#ecuting the arithmetic instruction, the control

    unit ena%les to send a copy of the values stored inaddress of +a and address of +% to the internal

    registers of the ALU and signals the ALU to perform

    the sum operation.

    3. $heALUperforms the addition. After the computation,

    the control unit ena%les to send the copy of the result

    %ac" to the memory)address of +sum*.

    4. Finally, the result is displayed on the monitor. $hecontrol unit ena%les to send the copy of the values of

    the address of +sum to the monitor )%uffer* and

    signals it. $he monitor displays the result.

    5. 6o! this program e#ecution is complete.

  • 7/21/2019 First Year Lecture 1

    16/45

    7or&ing Prin!iples of a CPU

  • 7/21/2019 First Year Lecture 1

    17/45

    Arithmetic 7perations

    Arithmeti! operations in!lude addition0 su%tra!tion0

    multipli!ation0 and di#ision+

    7hile performing these operations0 the A"U ma&es

    use of the registers+ Upon !ompletion of the arithmeti! operation0 the

    result !an %e transferred from the register to the

    main memor)+ In addition to registers0 the arithmeti! unit uses one

    or more adders that a!tuall) perform arithmeti!

    operations on the %inar) digits+

  • 7/21/2019 First Year Lecture 1

    18/45

    Arithmeti! Operations

    $he arithmetic operation in adding t!o num%ers 0 8 4can %e demonstrated through follo!ing steps 9

    (tep *4 : and ; are put into to separate memor)

    lo!ations+

    (tep ,4 The !ontrol unit fet!hes the to num%ersfrom their memor) lo!ations into the data registers+

    (tep .4 The arithmeti! unit loo&ing at the operator 192

    uses the a!!umulator and adds the to num%ers+

    (tep /4 The A"U stores the result 1*.2 in memor)%uffer register+

    (tep :4 Then the !ontrol unit stores the result into a

    user desired memor) lo!ation0 sa)

  • 7/21/2019 First Year Lecture 1

    19/45

    Arithmeti! Operations

  • 7/21/2019 First Year Lecture 1

    20/45

    "ogi!al Operations

    Some of the %asic functionsperformed %y the ALU are,

    add, su%tract, logical A6:,

    logical 7;, shift left and shift

    right on t!os complement

    %inary num%ers.

    $he inputs to %e calculated

    are stored in the inputregister )A; output register

    )ACCU?* for add, A6: and

    7; functions.

  • 7/21/2019 First Year Lecture 1

    21/45

    Memor) Unit

    The term >memor)? usuall) refers to the mainmemor) of the !omputer+

    There are different t)pes of memor)4

    *+ Random A!!ess Memor) 1RAM2,+ Read Onl) Memor) 1ROM2

    .+ Programma%le Read Onl) Memor) 1PROM2

    /+ Erasa%le Programma%le Read5Onl) Memor)

    1EPROM2

    :+ Ele!tri!all) Erasa%le Programma%le Read5

    Onl) Memor) 1EEPROM2

  • 7/21/2019 First Year Lecture 1

    22/45

    Random A!!ess Memor) 5 RAM

    This is reall) the main store and is the pla!e herethe program gets stored+

    7hen the CPU runs a program0 it fet!hes the

    program instru!tions from the RAM and !arries

    them out+

    If the CPU needs to store the results of the

    !al!ulations it !an store them in RAM+

    It is a #olatileform of memor)+

  • 7/21/2019 First Year Lecture 1

    23/45

    Read Onl) Memor) 5 ROM

    In ROM0 the information is %urnt 1pre5re!orded2 intothe ROM !hip at manufa!turing time+

    On!e data has %een ritten into a ROM !hip0 it

    !annot %e erased %ut )ou !an read it+ ROM is a non5#olatile memor)+

    ROM stores !riti!al programs su!h as the program

    that %oots the !omputer+

  • 7/21/2019 First Year Lecture 1

    24/45

    Programma%le Read Onl) Memor) 5 PROM

    ;7?is a memory on !hich data can %e

    !ritten only once.

    A variation of the ;7?chip is that it is not

    %urnt at the manufacturing time %ut can %e

    programmed using ;7?programmer or a

    ;7?%urner.

    ;7? is also a non-volatile

    memory

  • 7/21/2019 First Year Lecture 1

    25/45

  • 7/21/2019 First Year Lecture 1

    26/45

    Ele!tri!all) Erasa%le Programma%le Read Onl)

    Memor) -

  • 7/21/2019 First Year Lecture 1

    27/45

    Data Representation

    The smallest unit of information is a single digit!alled a

  • 7/21/2019 First Year Lecture 1

    28/45

    hierar!hi!al memories4

    $he registers )internal memory* are used to holdthe instruction and data for the e#ecution of the

    processor.

  • 7/21/2019 First Year Lecture 1

    29/45

    The se!ondar) memor)

    The se!ondar) memor) is the memor) thatsupplements the main memor)+

    The program should %e %rought into the main

    memor) from the se!ondar) memor) %efore

    %eing e6e!uted+

    The se!ondar) memor) is !heaper !ompared

    to the main memor)+

    Computer generall) has limited amount of main memor) and

    large amount of se!ondar) memor)+

  • 7/21/2019 First Year Lecture 1

    30/45

    (torage De#i!es

    Bard Dis& @ard dis" is a magnetic dis" on !hich you can store

    computer data.

    $he hard dis" is a direct-access storage medium.$his means you can store and retrieve data randomly.

  • 7/21/2019 First Year Lecture 1

    31/45

    (torage De#i!es

    ?agnetic $apeA recording medium consisting of a thin tape !ith a

    coating of a fine magnetic strip, used for recording

    digital data.

    its are recorded as magnetic spots on the tape along

    several trac"s. Usually, seven or nine %its are

    recorded simultaneously to form a character together

    !ith a parity %it.

  • 7/21/2019 First Year Lecture 1

    32/45

    (torage De#i!es

    'lopp) Dis& The flopp) dri#e uses a thin !ir!ular dis& for data

    storage+ It is a soft magneti! dis&+

    It is a thin magneti!5!oated dis& !ontained in a

    fle6i%le or semi5rigid prote!ti#e a!&et+

    The dis& rotates at . rpm+

    A readrite head ma&es ph)si!al !onta!t ith the

    dis& surfa!e+

    Data is re!orded as a series of tra!&s

    su%di#ided into se!tors+

  • 7/21/2019 First Year Lecture 1

    33/45

    (torage De#i!es

    7ptical :is" 7ptical dis"s are a storage medium from !hich

    data is read and to !hich it is !ritten %y lasers.

    $he optical dis" is a random access storagemediumB information can %e easily read from any

    point on the dis".

    C:-;7? stands for Compact :is" - ;ead 7nly?emory.

  • 7/21/2019 First Year Lecture 1

    34/45

    &nput and 7utput :evices

    &nput devices is also defined as a device that provides

    communication %et!een the user and the computer.

    For e#ample, a "ey%oard is an input device.

  • 7/21/2019 First Year Lecture 1

    35/45

    ey%oard

    $he most common input device is the "ey%oard.

    $he "ey%oard detects the "ey pressed and generates the

    corresponding ASC&& codes !hich can %e recogni/ed %y

    the computer.

  • 7/21/2019 First Year Lecture 1

    36/45

    ?ouse

    ?ouse is an input device that controls the movement of

    the cursor on the display screen.

    a small %all is "ept inside and touches the pad through a

    hole at the %ottom of the mouse. Dhen the mouse is

    moved, the %all rolls.

    $his movement of the %all is converted into signals and

    sent to the computer.

  • 7/21/2019 First Year Lecture 1

    37/45

    Scanner and ar Code ;eader

    Scanner is an input device that allo!s information such as

    an image or te#t to %e input into a computer.

    $he %ar-code reader scans the information on the %arcodes

    and transmits to the computer for further processing.

    Scanner ar code reader

  • 7/21/2019 First Year Lecture 1

    38/45

    $ouch Sensitive Screen and 7ptical Character

    ;ecognition )7C;*

    $ouch Sensitive Screen is a pointing device that ena%les

    the user to interact !ith the computer %y touching the

    screen.

    Eou can use your fingers to directly touch the o%ects on the

    screen.

    $he 7C; techni'ue permits the direct reading of any

    printed character.

    $he computer !ill recogni/e the characters in the page as

    letters and punctuation mar"s, and stores. $his can %e

    edited using a !ord processor.

  • 7/21/2019 First Year Lecture 1

    39/45

    Light en and ?agnetic ;eader

    A light pen is a pointing device shaped li"e a pen and is

    connected to a monitor.

    ?agnetic reader is an input device !hich reads a

    magnetic strip on a card. &t is handy and data can %e

    stored and retrieved.

  • 7/21/2019 First Year Lecture 1

    40/45

    ?icrophone

    ?icrophone serves as a voice input device.

    &t captures the voice data and input to the computer.Using the microphone along !ith speech recognition

    soft!are can offer a completely ne! approach to input

    information into your computer.

  • 7/21/2019 First Year Lecture 1

    41/45

    7utput :evices

    An output device is capa%le of presenting information from a computer.

    Monitors

    ?onitor is a commonly used output device, sometimes called as display

    screen.

    $he num%er of pi#els that can %e displayed vertically and hori/ontally

    gives the resolution of the monitor.

    $he resolution of the monitor determines the 'uality of the display.

    Some popular resolutions are 2G # 4G pi#els, 4GG # 2GG pi#els and

    1G( # 324 pi#els.

  • 7/21/2019 First Year Lecture 1

    42/45

    7utput :evices

    Printers

    rinter is an output device that prints te#t or images on

    paper or other media.

  • 7/21/2019 First Year Lecture 1

    43/45

    7utput :evices

    (pea&ers

    $he computer can also give produce voice output)audio

    data*.

    Spea"er serves as a voice output device.

  • 7/21/2019 First Year Lecture 1

    44/45

    Storage :evices

    $he smallest unit that can %e !ritten to or read from the

    dis" is a sector.

    $he storage !apa!it) of the dis" is determined as

    1num%er of tra!&s F num%er of se!tors F %)tes per

    se!tor F num%er of readrite heads2+

    $he arrangement of trac"s and sectors on a dis" is "no!n

    as its +format.

    @igh data rates demand that the dis" rotates at a high

    speed )a%out ,2GG rpm*.

  • 7/21/2019 First Year Lecture 1

    45/45

    Computer Organiation

    3asi! Components of a Digital Computer Central Pro!essing Unit 1CPU2

    Memor) Unit

    Input and Output De#i!es