Top Banner

of 20

Understanding a System Computer)

Apr 07, 2018

Download

Documents

kickers9000
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/6/2019 Understanding a System Computer)

    1/20

    14 Part A Computer Systems

    In this chapter, we shall study the system unit of a personal computer, the

    CPU, the factors that affect the performance of a CPU and the classification

    of main memory.

    2.1 THE SYSTEM UNIT OF A PC

    A computer system consists of both hardware and software. Hardware

    refers to the actual machinery, for instance, the microprocessor, keyboard,

    mouse and monitor etc. Software refers to programs or data.

    The hardware components of a basic computer system consists of

    1. Central processing unit (CPU)

    2. Main memory

    3. Input devices

    4. Output devices

    5. Secondary storage

    6. Communication devices.

    Components other than the CPU and main memory are collectively knownas peripheral devices.

    Fig.2.1 The hardware components of a basic computer system

    System Unit

  • 8/6/2019 Understanding a System Computer)

    2/20

    1Chapter 2 System Unit

    microprocessor

    memory module

    interface card

    backview of a system unit System unit with lid open

    Fig.2.2 The system unit of a personal computer

    A personal computer can be viewed as made up of a system unit and

    some peripheral devices. For a desktop computer, the system unit appears in

    the form of a metal or plastic case which houses the motherboard, CPU, main

    memory, interface cards, power supply and storage devices. For a notebook

    computer, the system unit encases almost all its electronic components in

    a metal or plastic case. Note that storage devices are regarded as peripheral

    devices.

    Components on the Motherboard

    The motherboard is the main circuit board that includes all essential

    chips, connecting circuitryand interfacing facilities.

    n Chip A chip is an integrated circuit that contains many transistors on asmall piece of semi-conducting material. On the motherboard, there are

    sockets which allow certain chips to be removed for repairs or upgrades.

    Both the microprocessorand main memoryare chips that can be plugged

    into the motherboard. Besides these important chips, other housekeeping

    chips also exist on the motherboard.

    n Connecting circuitry The connecting circuitry links between the chipson the motherboard. For example, the connecting circuitry provides

    channels for data transfer between the CPU and main memory. Similar

    channels also exist between the main memory and peripheral devices.

    Each channel is called a bus and is made up of a number of conducting

    wires, allowing a series of electronic bits to transmit at the same time.

    ports

  • 8/6/2019 Understanding a System Computer)

    3/20

    16 Part A Computer Systems

    Each bus is a composition ofaddress bus,data busand control lines. For

    example, when a piece of data is fetched from the memory, the address

    is sent over the address busto signal a memory location, and the data isthen copied from the memory location to the data bus, which passes the

    data to the destination.

    n Interfacing facilities The interface facilities of a motherboard appear inthe form ofportsand expansion slots.

    A port is built on the motherboard and is designed to connect to a

    peripheral device or another computer. There are various types of ports

    designed for different peripheral devices (See Table 2.1). Usually, a

    cable is needed to connect a port to a peripheral device, like a printer,

    a keyboard or a mouse. There are also ports which is an EM-Wave

    transceiver that allows connection to peripherals using infrared or

    microwaves. A transceiver is a device that can send and receive signals.An example is the IrDA port which sends and receives infrared.

    Fig.2.3 The address bus and data bus between the CPU and memory of acomputer. MAR and MDR are registers in the CPU (see Chapter 10).

    Port Name Peripheral devices

    1. Keyboard and mouse port Keyboard, mouse

    2. Serial port Mouse, modem, graphic tablet

    3. Parallel port Printer

    4. SCSI port SCSI devices, e.g. hard disk

    5. USB port Large range of devices6. IEEE 1394 port DV camcoder, digital camera

    7. IrDA port (Infrared DataAssociation)

    Devices that use infrared (Not Bluetooth)

    8. PCMCIA port (for notebookcomputers only)

    PC cards, e.g. Network interface card, harddisk, sound cards, radio transceiver etc.

    Table 2.1 Common ports and their corresponding peripheral devices

  • 8/6/2019 Understanding a System Computer)

    4/20

    1Chapter 2 System Unit

    Forms of chips

    A chip consists of a super thin slice of semi-conducting material packed with elements like wires,

    transistors, capacitors and resistors. Semi-conducting material, such as Silicon or Germanium, are

    substances with properties between that of a conductor and an insulator.

    A chip may be a microprocessor, memory module or supporting circuitry. It is packaged in a

    protective carrier that also provides connectors to other computer components. There are at least

    three forms of chip carriers: rectangularDIP (dual in-line package), circuit-board-like DIMM (dual

    in-line memory module), or pin-cushion-like PGA (pin-grid arrays).

    An expansion slot allows an interface card to be inserted into the

    motherboard. An interface card is a separate circuit board which is an

    add-on component to increase the function of a computer. Examples are

    the network interface card (NIC), video card, sound card and modem card.

    Some interface cards come with their own ports, allowing connection to

    other peripheral devices.

    Card Name Peripheral devices

    1. Network interface card (NIC) Switch or hubs of local area network or Internet

    2. AGP video card Visual Display Unit

    3. Sound card Microphone, loudspeaker

    4. Modem card Telephone network

    Fig.2.4 Three common forms of chip carriers

    DIP has two parallel rows of pins

    DIMM is mainly used for memory module.The number of pins can be 72, 144, 168, 184(DDR), or 284 (DDR-II).

    PGA is mainly used formicroprocessors. The pins arearranged in concentric squares

    Table 2.2 Common interface cards and the corresponding peripheral devices

  • 8/6/2019 Understanding a System Computer)

    5/20

    18 Part A Computer Systems

    2.2 THE CPU

    A central processing unit (CPU) is designed to process instructions that

    operate a computer. The CPU of a personal computer is a microprocessor,

    which is a single integrated circuit that contains millions of transistors. A

    microprocessor performs essentially the same tasks as the CPU of a classic

    mainframe. It is sometimes described as a CPU on a chip.

    A CPU consists of two major components: the CU and ALU. It also

    includes circuitry for devices such as registers, cache memory and various

    execution units.

    n CU

    The control unit (CU) controls the overall operations of the computer.

    It repetitively interprets an instruction from a program and starts

    appropriate action. It also controls the operations of the peripheral

    devices.

    n ALU

    The arithmetic and logic unit (ALU) performs arithmetic operations,

    such as addition and subtraction of integers. It also performs logical

    operationssuch as comparing two numbers to see if they are the same.

    n Registers

    Registers are special memory locations inside a CPU, allowing fast

    access. Some of them are needed by the ALU in computation to hold data

    to be processed. Others are needed by the CU to control the execution of

    instructions.

    A typical CPU includes memory address register (MAR), memory data

    register (MDR), instruction register (IR), program counter (PC), general

    purpose registers, and so on. Registers are accessed by machineinstructions. While an address of a main memory location involves

    several bytes, the address of a register may require only several bits.

    Fig.2.5 The CPU and otherhardware components

    Note

    Integer arithmetic are handled

    by the ALU. A similar unit

    called foating-point unit(FPU) is designed to handle

    real numberarithmetic. An

    integer unit consists of an ALU

    and its own CU. A modern CPU

    has several integer units and at

    least one FPU.

  • 8/6/2019 Understanding a System Computer)

    6/20

    1Chapter 2 System Unit

    2.3 PROCESSOR PERFORMANCE FACTORS

    The performance of a CPU is affected by several factors: clock rate, word

    length, cache size, instruction setand processing techniques.

    A. Clock rate

    A CPU works with a timing device, called clock, which generates ticks

    (or clock cycles) regularly. The clock rate is the number of ticks produced per

    second. It determines the pace for executing instructions.

    The unit of clock rate is hertz (Hz). Mega (M) is a prefix representing

    one million (106). Giga (G) represents one billion (109). For example, a 800 MHz

    PowerPC microprocessor produces 800 million ticks in one second and a 3.0

    GHz Intel Pentium 4 microprocessor operates at a speed of 3 billion cycles per

    second. All other things being equal, a computer of the same familywith a 3.0

    GHz is faster than a computer with 2.0 GHz. Clock rate should notbe used to

    compare computers of different brands (See Chapter 10).

    It is important to understand that the clock rate of a CPU is not equal to

    the number of instructions that the CPU can execute in one second. The reason

    is that most instructions take several ticks to complete. The execution of an

    instruction involves several stageseach requires at least one tick. We shall see

    that clock rate is not the only factor that determines the CPU performance.

    Table 2.3 Development of Intel processors (Information extracted from www.intel.com)# Itanium was introduced in 2001 + Pentium class was introduced in 1993 and Pentium 4 was introduced in 2*Date of introduction See Appendix for further details.

    Note

    A tickis the smallest un

    of time in the universe o

    microprocessor. In a sing

    processor system, every

    performed by a CPU is in a multiple number of t

    Itanium 2 Pentium 4 Intel486TM DX Intel386TM DX 80286 8086

    Typical use

    Demanding

    enterprise-classservers

    Desktops and

    entry-levelworkstation Desktops Desktops Desktops Desktops

    Clock rate 1.6 GHz 3.80 GHz 50 MHz 33 MHz 10 MHz 4.77 MHz

    Word length 64 bits 32 bits 32 bits 32 bits 16 bits 16 bits

    No. of transistors 592 million 125 million 1.2 million 0.275 million 0.134 million 0.029 mil

    As of date Nov 2004# Nov 2004+ Oct 1989* Oct 1985* Jan 1982* Aug 1978

    Intel clone

    Today, Intel is the world's largest chipmaker and supplies a signicant percentage of the microprocessors

    that power PCs. Other companies, like Advanced Micro Devices (AMD), also make Intel-compatible

    processors, known as Intel clones, but at a lower price. AMD's Athlon processors are direct competitors

    to Intel's Pentium class CPU and have a slight performance advantage according to somesoftware

    benchmarks. (Note: Cyrix which once produced Intel486TM compatible CPU has been bought by VIA)

    Clock rate is one of many factors that determine the performance of a CPU. Today, only Intel still uses

    clock rate as a selling point in her marketing strategy. As of the print of this book, it is generally agreed

    that, given the same clock rate, AMD Athlon is about 30% faster than Intel Pentium 4.

  • 8/6/2019 Understanding a System Computer)

    7/20

    20 Part A Computer Systems

    B. Word length

    Word length refers to the number of bits that a microprocessor can

    manipulate at one time. Word length is the size of the general-purpose

    registersin the CPU.

    In general, a longer word length will give better performance. Suppose

    we wish to perform an addition of two 32-bit numbers. If the registers are all

    16 bits, each value will have to be stored in two registers and the calculation

    will involve two separate additions. If the registers were all 32 bits, the amount

    of processing would be halved. Today's personal computers typically contain

    32-bit. Advanced computers use 64-bit processors.

    C. Cache Memory

    Data transfer between the CPU and main memory is slow. Very often,

    the CPU has to wait for memory access and becomes idle. Cache memory

    is a high-speed memory that holds data which duplicate some data stored

    in the main memory. When the data needed by the CPU are stored in the

    cache memory, the access time will be much smaller than fetching the

    same data from the main memory.

    Cache memory is divided into at leasttwo levels: Level 1 (L1)cache

    and Level 2 (L2) cache, located in different dies. A die is a silicon slice

    inside a chip. L1 cache is located in the same die as the processor, whereas

    L2 cache is located in a separate die. Current microprocessors include

    both L1 and L2 caches in the same protective carrier (i.e. same chip). But,

    in the past, L2 appeared as a separate chip.

    L1 cache is faster but smaller than L2 cache the L1 capacity isusually measured in KB, while that in L2 is in MB. Since cache memory is

    fixed inside the processor, its size is not configurable.

    x-bit processor

    What doesx in anx-bit processor mean?

    x represents the number of bits used in general-purpose registers (i.e. the integer registers) inside the

    processor. For example, the size of integer registers in a 32-bit processor is 32 bits.

    Normally, a processor with longer word length will also have wider data bus and wider address bus. However,

    it is not necessarily true that the widths of these buses are the same as the word length. An example is Intel

    Pentium 4, which is a 32-bit processor, but with 36-bit address bus width and 64-bit data bus width.

    32-bit CPUs have been common in personal computers since Intels 386 in 1985. In 2001, Intel released

    its rst 64-bit CPU Itanium. In 2003, AMD released its rst 64-bit CPU Athlon 64. Using a processor with

    longer word length will make working with huge amount of data easier, such as video editing. However,

    general computation can beslowerbecause programs will be larger in size and may not be t completely into

    the cache memory.

    The movement from a 32-bit to a 64-bit CPU is a major alteration, since operating systems must be modied

    to take advantage of the new architecture.

    Fig.2.6 Cache memory

  • 8/6/2019 Understanding a System Computer)

    8/20

    2Chapter 2 System Unit

    D. CISC or RISC

    In 1970s, there was a tendency to offer more varied functions and

    give more high-level features to machine instructions. The result is an

    increase in size of the instruction set and complexity of the instructions. This

    tendency continued until mid-80s, when chip designers realised that complex

    instructions could not improve the CPU performance, because the differencein time for performing instructions is not suitable for pipelining(see below). A

    CPU with complex instructions is referred to as CISC (Complex instruction set

    computer) architecture. An example is the Intel 80286 microprocessors.

    A CPU that includes a very limited set of instructions is referred to

    as RISC (Reduced instruction set computer) architecture. Examples are

    Motorolas PowerPC and Suns SPARC.

    Because RISC instructions are simple, most of them use the same

    set of stages and take equal time to complete. This facilitates pipelining

    and parallelism resulting in higher execution speed. Another advantage is

    that RISC chips are less complicated and require fewer transistors (though

    more registers), reducing the cost of design and production. However, RISC

    architecture requires more instructions for the same program.

    The trend is that newer CISC CPUs are designed with a subsetof RISC

    instructions, and traditional instructions are split into many RISC instructions

    so that the CPU can make use of the advantages of RISC. An example is the

    Intel Pentium 4 microprocessors.

    E. Pipelining

    As mentioned earlier, most instructions require several clock cycles to

    complete (see Clock rate). In fact, each instruction involves several discrete

    stages. In a traditional processor, instructions are executed so that all the stages

    of an instruction are completed before the next instruction can be executed.

    Pipelining is a technology that allows execution of the next instruction to start

    before the previous instruction is fully completed. Pipelining increases the

    throughput of the system.

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

    Stage 1 I1 I1 I2 I2 I3 I3

    Stage 2 I1 I1 I2 I2 I3 I3

    Stage 3 I1 I1 I2 I2 I3 I3

    Stage 4 I1 I2 I3

    Stage 5 I1 I2 I3

    Clock cycle

    Sequence

    Fig.2.7 A pipeline with five stages that can overlap. For example, when the CPU is performing stage 2 ofI1, it is also performing stage 1 of I2. (I1, I2 and I3 represents three instructions, each of 5 stages)

    Note

    Intel 80286 is a typic

    CISC CPU. Starting f

    386, features of RI

    can be found in Intel

    processors.

    Note

    More registers are nein RISC to reduce me

    access. Some may thi

    more registers will in

    the cost of a CPU. Bu

    this is cost-effective a

    CPU performance can

    enhanced.

  • 8/6/2019 Understanding a System Computer)

    9/20

    22 Part A Computer Systems

    A daily life example of pipelining is serving set lunch in a fast food

    caf. Assume that each set-lunch includes soup, bread, main course and drink.

    Instead of preparing the whole set in a single counter, the caf may set up four

    counters. A customer after getting the soup will proceed to the next counter

    which serves breads. The second customer will then be served soup, without

    having to wait for the completion of the first customer.

    F. Multiple Execution Units Superscalar

    An execution unit (or function unit) is a part of the CPU that performs

    operations and calculations. Examples are integer unit and floating-point

    unit (FPU) which handles integer and floating-point mathematics respectively.

    In fact, an integer unitconsists of an ALU and its own CU. A processor with

    multiple integer units and one or two FPUs is called superscalar architecture,

    allowing more than one instruction to be executed concurrently in the

    same chip. Note that concurrent here is not referring to the overlapping

    of instruction stages as in pipelining, but complete separation of execution

    processes.

    G. Multiple processors

    A computer system may consist of multiple processors. It means

    that a number of separate processors are working in parallel to solve a

    single problem. The processing is called multi-processing. Superscalar and

    multi-processing are examples of parallel processing (or parallelism). Unlike

    pipelining and superscalar, multi-processing requires a special operating

    system that supports multiple processors.

    Do not confuse multi-processingwith multi-tasking the latter usually

    describes the capability of a single CPU (See Chapter 4).

    H. Distributed processing

    Distributed processing refers to aggregating

    the power of several computers to run a single

    computational task in a collaborative manner. An

    example is the use of the Web. A Web server, routers,

    DNS servers and a Web browser together form a

    distributed system.

    Another example is the UC Berkeley SETI (Search

    for Extra-Terrestrial Intelligence) project, SETI@home.

    You may contribute your CPU time to help analyse

    data collected from the outer space.

    Note

    1. In Intel386, the FPU is

    an optional chip known as

    Math co-processor.

    2. Intel Pentium 4 has 1

    FPU; Intel Itanium and

    AMD AthlonXP each has 2

    FPU.

    3D-NOW!

    The 3D-NOW! technology isdeveloped by AMD to perform

    multimedia tasks quickly, such

    as 3D games. It is characterised

    by a set of FPU-specic

    instructions that carry out

    oating-point arithmetics

    needed by 3D graphic display.

    Fig.2.8 The programSETI@home running as a screen saver

  • 8/6/2019 Understanding a System Computer)

    10/20

    2Chapter 2 System Unit

    2.4 MAIN MEMORY

    Besides the microprocessor, main memory is another important

    component found on the motherboard. The main memory (or memory),

    which includes RAM, ROM and CMOS, stores data, instructions and some vital

    information about the computer.

    Main memory is classified into: volatile and non-volatile. The contents of

    the volatile memory will be lost when the computer power is turned off. On

    the other hand, non-volatile memory will retain the contents after the power is

    turned off.

    A. Types of Memory

    There are three types of memory: RAM, ROMand CMOS.

    1. RAM

    Random access memory (RAM) is a temporary holding area for data,

    application programs and the operating system, as long as the computer is

    running. RAM is volatile. All personal computers today use dynamic RAM

    (DRAM) for the main memory. In a DRAM, capacitors are used to hold the bits

    a charged capacitor represents a 1 and discharged capacitor represents a 0.

    Since the charge on a charged capacitor will drain away as time goes by, DRAM

    needs recharging from time to time. (Static RAM is made oftransistorsand is

    used in cache, registers and CMOS)

    Speed of RAM indicates how fast the RAM circuitry reacts to update the

    data. It can be expressed in nanoseconds (10 -9 s) or MHz (106 Hz). For example,

    8 ns RAM means it takes 8 ns to update a piece of data. 8 ns is equivalent to1/(8 10-9 s) = 1.25 108 Hz or 125 MHz. Under equal conditions, 8 ns RAM is

    faster than 10 ns RAM.

    Types of RAM

    RAM can be classied into

    1. SRAM Static, used in cache memory, registers and CMOS

    2. DRAM Dynamic, used in the main memory

    DRAM is further classied into1. EDO RAM Extended data out, less popular

    2. SDRAM Synchronous DRAM, most popular

    3. RDRAM Rambus DRAM, more expensive

    SDRAM can have different effective speeds under the same clock rate,

    arranged in ascending order of speed:

    1. SDR SDRAM Single data rate SDRAM

    2. DDR SDRAM Double data rate SDRAM

    3. DDR-2 SDRAM Double data rate two SDRAM, will be the most

    popular. There is also DDR-3 SDRAM.

    Note

    Loading a le means

    copying data from the

    secondary storage to the

    main memory. When

    the computer is poweredon, certain operating

    system les are loaded

    automatically from the h

    disk into the RAM.

    Saving a le means cop

    data from RAM to the

    non-volatile secondary

    storage.

    Fig.2.9 Memory of acomputer

    Other RAM

    RAM not only exists on

    the motherboard, but can

    also be found in periphe

    devices, like video adap

    and hard disk. The RAM

    in a video adapter is use

    to display images on the

    screen of a VDU. Each

    pixel corresponds to a pi

    of data in the video RAM

    So, a screen with higher

    resolution needs more v

    RAM. The RAM in a ha

    disk is used as buffer(s

    Chapter 10).

  • 8/6/2019 Understanding a System Computer)

    11/20

    24 Part A Computer Systems

    2. ROM

    Read only memory (ROM) stores data permanently and is non-volatile.

    The contents in ROM can be read but cannot be changed.

    The instructions stored in ROM are known as firmware, which means

    that the instructions are stored permanently in a chip instead of disc.

    Instructions are said to be hard-wired in ROM.

    A. Variations in Non-volatile Memory

    There are other types of ROM: PROM, EPROMand EEPROM.

    PROM stands for programmable read only memory. It is a memory chip

    that can be written once. A special device called PROM programmer (or burner)

    is needed to write the user's data and instructions. Once written, the contents

    cannot be changed any more. PROM is different from ROM in that a PROM is

    manufactured and sold as a blank memory.

    PROM is used for storing the specialised or unique programs that

    custom-manufacturing of a true ROM would be too costly. A well known use of

    PROM is by the video game producers.

    EPROM stands for erasable programmable read only memory. It is

    similar to PROM, except that the contents can be erased under ultraviolet. An

    example of use is in manufacturing industry where other types of storage are

    not suitable. The EPROM provides instructions to a machine that performs

    repetitive tasks in manufacturing a certain product. When the old production

    is finished and a new production is started, the old instructions can be erased.

    Then, the EPROM is programmed with a new set of instructions.

    EEPROM stands for electrically erasable programmable read onlymemory. It is similar to RAM in that it can be read and written using a

    computer. But, unlike RAM, EEPROM is non-volatile, i.e. it does not need

    continuous power to retain the data.

    Some people called EEPROM as flash memory. But, there is a slight

    difference between the two: EEPROM writes one byte at a time, whereas flash

    memory writes a block of bytes at a time. Therefore, flash memory is faster.

    B. BIOS

    The startup program BIOS (basic input/output system) used in computeris stored in an EEPROM (or flash ROM). This explains why BIOS can be updated.

    BIOS is part of the system programs. These instructions tell the computer

    how to access the hard disk, find the operating system, and load it into RAM.

    Once the operating system is loaded, the computer will understand your input,

    run software and access your data. See Fig.4.11.

    Note

    Some computers have dual bios a main BIOS and a backup

    BIOS. The purpose of using

    two BIOS chips is to help the

    motherboard recover from

    issues that may happen during

    a BIOS update and help protect

    the BIOS from any potential

    virus, such as CIH in 1999.

  • 8/6/2019 Understanding a System Computer)

    12/20

    2Chapter 2 System Unit

    3. CMOS Memory

    CMOS memory (Complementary metal-oxide semiconductor memory)

    is a type of memory on the motherboard that stores the configuration

    information about a computer. It includes information like current time and

    date, capacity of hard disk, types of existing ports, keyboard and monitor, and

    so on. However, CMOS does not store programs.

    CMOS memory is usually powered by a small battery. Unlike ROM, the

    computer can change the information in CMOS memory. Unlike RAM, the

    contents in CMOS memory are retained even the main power supply is turned

    off. This is because the contents in CMOS memory are kept by an independent

    battery.

    RAM ROM CMOSmemory

    Permanence volatile non-volatileContents are kept by a

    battery

    Flexibility read and write read only read and write

    Type of informationdata and instructions

    being processedsystem program and

    dataconfiguration data

    Size largest small smallest

    Upgradableyes; memory size can

    be increasedno no

    Table 2.4 Comparison between RAM, ROM and CMOS

    Fig.2.10 CMOS display

    Note

    It is controversial to say

    whether CMOS memory

    is volatile or not. From

    users point of view, CMis non-volatile because th

    data you enter will remai

    unchanged after the com

    is powered off.

    From the engineers poin

    of view, CMOS is volatil

    because CMOS is made

    transistors which require

    electrical power to hold t

    data.

    Therefore, it depends on

    volatile is dened.

  • 8/6/2019 Understanding a System Computer)

    13/20

    26 Part A Computer Systems

    B. Memory Size

    Memory size is measured in byte. A byte consists of eight bits. Each

    ASCII character requires one byte or eight bits of memory.

    Manufacturers always produce memory in multiples of 210 = 1,024 bytes

    or one kilobyte, abbreviated as KB or K. For example, a memory of 128 KB is

    equal to 128 1,024 = 131,072 bytes.

    In recent years, memory size increases drastically. Memory chips are

    produced to hold kilo of kilobytes, called megabyte (MB). 1 MB is equal to 220 =

    1,024 1,024 bytes = 1,048,576 bytes.

    Similarly, larger memory size is measured in kilo of megabyte, called

    gigabyte (GB). 1 GB is equal to 230 =1,024 1,024 1,024 = 1,073,741,824

    bytes.

    Sometimes, for the purpose of simplicity, 1024 is rounded down to 1000.

    Therefore, 1 KB is approximately equal to one thousand bytes. 1 MB equals

    approximately one million bytes and 1 GB approximates one billion bytes.

    The size of main memory affects the efficiency of the computer. A

    computer is usually upgraded by increasing the memory size. This explains

    why the memory chips are removable from the motherboard.

    Term AbbreviationApproximate Memory

    Size (bytes)Exact Memory Size

    (bytes)

    Kilobyte KB / K 103 = 1,000 210 = 1,024

    Megabyte MB 106 = 1,000,000 220 = 1,048,576

    Gigabyte GB 109 = 1,000,000,000 230 = 1,073,741,724

    Table 2.5 Memory and storage size

    Note

    ASCII uses 7 bits to represent

    characters. Since the minimum

    accessible unit in a computer is

    one byte, in modern computers,an ASCII character is stored

    using 8 bits with the most

    signicant bit (leftmost bit) set

    to 0.

    What should be considered in upgrading a microprocessor?

    The rst thing to consider is budget. The price of the latest and fastest microprocessor is often much

    higher than the second or third latest versions. Sometimes, it can be as high as half the price of the

    entire system unit. The second thing to consider is the type of chipset and CPU socket on the

    motherboard. The new microprocessor must match with the existing motherboard. The third thing

    to consider is that a microprocessor can operate at full efciency only if all of the components in

    the computer also can handle the faster speed. It means that you may need to replace the RAM or

    motherboard as well.

    To nd out whether an upgrade would be worth the cost, you might do a little research on the Web or

    in computer magazines.

    Note

    In 1990s or before,

    specications ofstorage mainly

    used K for 1024 and M for1048576; whereas specications

    forrate of transmission used K

    for 103 and M for 106. In recent

    years, storage capacity also

    using M for 106 and G for 109

    become popular. This is perhaps

    due to two reasons:

    1. New terms like kibi, mebi,

    and gibi appear to represent

    210, 220 and 230 respectively.

    2. The new storage capacity

    is so high that consumersdo not care about the small

    differences.

  • 8/6/2019 Understanding a System Computer)

    14/20

    2Chapter 2 System Unit

    C. Data Access in memory

    The main memory can be thought of as a series of locations each of

    length one byte. Each location has a unique address, counting from zero

    onwards. The address is called memory address.

    For example, for a computer with a memory size of 1 K, the memory

    address ranges from 0 to 1,023.

    Since each byte has a unique address, the CPU can jump directly to the

    requested data (see note). Therefore, data fetching and storing can be done

    very efficiently. This mode of data access is called direct access, which is in

    contrast to sequential access.

    In sequential access, address is unknown. Data are accessed by searching

    from one end of the storage medium until a match occurs. Example of

    sequential access is to locate data from a tape or finding a word in a document.

    D. The Maximum Size of Memory

    Clearly, the size of a memory is limited by the maximum address. The

    maximum address is determined by the number of bits used in each address.

    For example, if 8 bits are used as address, the address space is from 0000

    00002

    to 1111 11112, which is equivalent to 0 to 28-1, or 0 to 127. Therefore, the

    maximum size of memory is 128 bytes.

    In general, ifn bits are used to represent an address, then

    the maximum size of memory = 2n bytes.

    In a computer, the number of bits used in each address is determined

    by the width of the address bus. For example, in Pentium 4, the address bus

    width is 36 bits. It means that it can address up to 236 bytes (or 26 230 = 64 GB

    = 6.87 1010 bytes).

    How does a computer

    to the requested data?

    Suppose the CPU needs a

    in the memory. The addr

    that data is put into the ad

    bus. The bus circuitry int

    the address and locates th

    requested data in the mem

    The data is copied to the

    bus, which passes the dat

    CPU.

    Fig.2.11 Memory address

  • 8/6/2019 Understanding a System Computer)

    15/20

    28 Part A Computer Systems

    E. Virtual Memory

    As the main memory is limited in size, will a computer run out of

    memory? The solution to this problem is virtual memory. Virtual memory is an

    area of a hard disk that extends the RAM.

    If the free space of RAM is less than the size of a new data from a file,

    data in RAM not recently used and not frequently used will be put to the virtual

    memory to make room for the new data. This process is called swapping. When

    the data on virtual memory are needed afterwards, they would be swapped

    back to the RAM again.

    The process described above is done by the computer automatically and

    is transparent to the users. Swapping will slow down the performance of the

    computer.

    For this reason, the performance of a computer also depends on the size

    of RAM, amount of free space of the hard disk and speed of the hard disk (See

    Chapter 10 for other factors). Increasing the size of RAM will reduce the chance

    of swapping data between RAM and hard disk.

    hard disk

    Virtual memory

    RAM

    CPU

    Fig.2.11 Virtual memory is used to extend the RAM

    Note

    In the old days of Windows

    3.1, too much swapping

    would easily lead to system

    crash.

  • 8/6/2019 Understanding a System Computer)

    16/20

    2Chapter 2 System Unit

    Summary

    n The hardware components of a basic computer system consists of

    Central processing unit (CPU)

    Main memory

    Input devices

    Output devices Secondary storage

    Communication devices.

    n Peripheral devices are components other than the CPU and main

    memory.

    n The motherboard is the main circuit board that includes all essential

    chips, connecting circuitry and interfacing facilities.

    n A chip is an integrated circuit that contains many transistors on a small

    piece of semi-conducting material.

    n A bus is a channel that connects all components, including the CPU and

    main memory and peripheral devices.

    n A bus comprises address bus, data busand control lines.

    n A port connects the motherboard to peripheral devices or other

    computers.

    n An expansion slot allows an interface card to be inserted onto the

    motherboard.

    n An interface card is a separate circuit board which is an add-on

    component to increase the function of a computer.

    n A central processing unit (CPU) is designed to process instructions that

    operate a computer. It consists of CU, ALU, registers, cache memory and

    various subsidiary processors.

    n The control unit (CU)

    controls the overall operations of the computer.

    interprets an instruction from a program and starts appropriate

    action. It also controls the operations of the peripheral devices.

    n The arithmetic and logic unit (ALU) performs arithmetic operations and

    logical operations.

    n Registers are special memory locations, allowing fast access.

    n The performance of a CPU is affected by clock rate, word length, cache

    size, instruction set and processing techniques.n The clock rate is the number of ticks produced per second and

    determines the pace for executing instructions.

    n The clock rate of a CPU is notequal to the number of instructions that

    the CPU can execute in one second.

    n Most instructions take several clock cycles to complete.

    n Word length is the size of the general-purpose registers in the CPU and

    determines the number of bits that a microprocessor can manipulate at

    one time.

  • 8/6/2019 Understanding a System Computer)

    17/20

    30 Part A Computer Systems

    n Cache memory is a high-speed memory that holds data which duplicate

    some data stored in the main memory. Cache memory reduces memory

    access time.

    n L1 cache is smaller than L2 cache, but faster. L1 cache is built into the

    processor die, whereas L2 cache is located in a separate die.

    n A die is a silicon subtrate. A microprocessor may have more than one die.

    n CISC (Complex instruction set computer) architecture

    consists of complex instructions

    has a large instruction set

    not suitable for pipelining

    n RISC (Reduced instruction set computer) architecture

    consists of simple instructions with equal length, equal number of

    stages and equal execution time

    has a smaller instruction set

    suitable for pipelining

    requires fewer transistors

    lower cost of design and production

    n Pipelining

    allows execution of the next instruction to start before the previous

    instruction is fully completed

    increases the throughput of the system.

    n An execution unit is a part of the CPU that performs operations and

    calculations, including integer unit and floating-point unit.

    n An integer unit is the combination of a CU and ALU that handles integer

    arithmetic.

    n A floating-point unit (FPU) handles floating-point mathematics.

    n Superscalar architecture is a CPU with multiple integer units and one ortwo FPUs in the same chip.

    n Multi-processing means using a computer system with multiple

    processors. It requires a special operating system that supports multiple

    processors.

    n Parallel processing refers to execution of the same task by multiple

    processors or execution units at the same time.

    n Distributed processing refers to aggregating the power of several

    computers to run a single computational task in a collaborative manner.

    n In a volatile memory, data will be lost when the computer power is

    turned off.

    n Random Access Memory (RAM) is a volatile memory for data,

    application programs and the operating system while the computer is

    running.

    n Read only memory (ROM) is a non-volatile memory that stores data

    permanently.

    n Firmware is the instructions stored in a ROM.

    n PROM (programmable ROM) can be written once and sold as a blank

    chip. It is used in some video game.

  • 8/6/2019 Understanding a System Computer)

    18/20

    3Chapter 2 System Unit

    n EPROM (erasable programmable ROM) can be written and the contents

    can be erased under ultraviolet. It is used in controlling robots in

    manufacturing and re-programmed when a new production is started

    n EEPROM (electrically erasable programmable ROM), also called flash

    memory, is non-volatile memory that can be read and written using a

    computer.

    n BIOS (basic input/output system) is a startup program stored in an EEPROM.

    tells the computer how to access the hard disk, find the operating

    system, and load it into RAM.

    n CMOS memory (Complementary metal-oxide semiconductor memory)

    stores the configuration information about a computer, but does

    not store programs.

    is powered by a small battery

    n Memory size is measured in byte.

    n A byte consists of eight bits.

    n 1 KB = 210 bytes; 1 MB = 220 bytes; 1 GB =230 bytes.

    n Each memory location has a unique address.

    n Direct access is data access using address. It is more efficient than

    sequential access.

    n Sequential access is data access without address. Data are accessed by

    searching from one end.

    n Ifn bits are used to represent an address, then the maximum size of

    memory = 2n bytes.

    n Virtual memory is an area of a hard disk that extends the RAM.

    n Swapping is needed when a new data exceeds the free space of RAM.

    Then, data in RAM not recently/frequently used will be put to the virtual

    memory to make room for the new data.

    n Swapping reduces performance. Too much swapping may lead to system

    crash.

    n Increasing the size of RAM will reduce the chance of swapping.

    Review Exercise

    Multiple Choice Questions

    1. A register

    A. is a high speed memory.B. is a peripheral device.C. carries data between the CPU and main memory.D. carries out additions.

  • 8/6/2019 Understanding a System Computer)

    19/20

    32 Part A Computer Systems

    2. Data from a peripheral device are transmitted to the CPU through

    A. the control unit.B. a data bus.C. an address bus.D. an expansion slot.

    3. A 32-bit CPU means that

    A. the data bus consists of 32 lines.

    B. the address bus consists of 32 lines.C. the control line consists of 32 lines.D. the word length is 32 bits.

    4. Given that the data bus of a computer consists of 32 lines. How many data can betransmitted at one time?

    A. 32 bytesB. 4 bytesC. 232 bytesD. 256 bits

    5. Which of the following about cache memory is NOT correct?

    A. L1 cache is faster than L2 cache.

    B. L1 cache is smaller than L2 cache.C. L1 cache is faster than main memory.D. L1 cache is mounted on the motherboard and separated from the microprocessor.

    6. A cache memory stores

    A. the booting program.B. the temporary data in an execution.C. the conguration information of a computer.D. a copy of some data in the main memory.

    7. Given that the clock rate of a CPU isfHz.

    A. Each instruction is nished within 1/fs.B. The CPU can performfinstructions in each second.

    C. The CPU can perform more thanfinstructions in each second.D. The CPU can perform less thanfinstructions in each second.

    8. Given that the clock rate of a CPU is 3 GHz. The duration of a clock cycle is

    A. 3 106 s.B. 3 109 s.C. 3.33 10-10 s.D. 3.33 10-6 s.

    9. Pipelining increases

    A. the CPU clock rate.B. the instruction execution time.C. the memory size.

    D. the throughput of a CPU.

    10. Which of the following about a RISC architecture is NOT true when compared withCISC architecture?

    A. The instruction set of RISC is smaller than that of CISC.B. All the CISC instructions have the same number of stages.C. The cost of design of a RISC CPU is less than that of a CISC CPU.D. Given the same task, more RISC instructions are needed than CISC instructions.

  • 8/6/2019 Understanding a System Computer)

    20/20

    3Chapter 2 System Unit

    11. The number of bytes in a 512 M RAM is

    A. 5.120 108

    B. 5.369 108

    C. 6.4 107

    D. 4.096 109

    12. Which of the following is executed when the computer is powered on?

    A. BIOSB. DOSC. CMOSD. EPROM

    13. Which of the following retain(s) data when the main power is turned off?

    (1) Flash ROM(2) CMOS(3) RAM

    A. (1) onlyB. (2) onlyC. (1) and (2) onlyD. (2) and (3) only

    14. Given that the memory size of a computer is 512 MB. What is the minimum number ofaddress lines need?

    A. 29B. 25C. 19D. The answer depends on the width of data bus.

    15. The address bus of a computer consists of 12 lines. What is the maximum addressablememory size?

    A. 12 bytesB. 4096 bytesC. 4096 bitsD. The answer depends on the width of data bus.

    16. A 32-bit computer has address bus width 36 and data bus width 64.

    A. The length of the register is 36 bits.B. The maximum memory size is 236 bytes.C. The data bus moves one word of data at a time.D. The computer can process 64 bits of data in each machine instruction.

    17. The virtual memory of a computer

    A. extends the size of RAM by using the hard disk.B. extends the size of RAM by using the cache memory.C. is a fast memory that improves the performance of a CPU.

    D. is an extra hard disk.

    18. Which of the following allows both read and write?

    (1) EEPROM(2) ROM(3) RAM

    A. (1) onlyB. (2) onlyC. (1) and (3) onlyD. (1), (2) and (3) only