Tuesday, November 9, 2010

ALU,Program counter,Instruction decoder

ALU (arithmetic/logic unit)
􀂾 Performs arithmetic functions such as add,
subtract, multiply, and divide, and logic
functions such as AND, OR, and NOT
􀂉 Program counter
􀂾 Points to the address of the next
instruction to be executed
􀂃 As each instruction is executed, the program
counter is incremented to point to the address
of the next instruction to be executed
􀂉 Instruction decoder
􀂾 Interprets the instruction fetched into the
CPU
􀂃 A CPU capable of understanding more
instructions requires more transistors to design

Registers

Registers
The CPU uses registers to store
information temporarily
􀂃 Values to be processed
􀂃 Address of value to be fetched from memory
􀂾 In general, the more and bigger the
registers, the better the CPU
􀂃 Registers can be 8-, 16-, 32-, or 64-bit
􀂃 The disadvantage of more and bigger registers
is the increased cost of such a CPU


INSIDE THE COMPUTER

Important Terminology

􀂉 The unit of data size
􀂾 Bit : a binary digit that can have the value
0 or 1
􀂾 Byte : 8 bits
􀂾 Nibble : half of a bye, or 4 bits
􀂾 Word : two bytes, or 16 bits
􀂉 The terms used to describe amounts of
memory in IBM PCs and compatibles
􀂾 Kilobyte (K): 210 bytes
􀂾 Megabyte (M) : 220 bytes, over 1 million
􀂾 Gigabyte (G) : 230 bytes, over 1 billion
􀂾 Terabyte (T) : 240 bytes, over 1 trillion

Internal Organization of Computers

􀂉 CPU (Central Processing Unit)
􀂾 Execute information stored in memory
􀂉 I/O (Input/output) devices
􀂾 Provide a means of communicating with
CPU

􀂉 Memory
􀂾 RAM (Random Access Memory) –
temporary storage of programs that
computer is running
􀂃 The data is lost when computer is off
􀂾 ROM (Read Only Memory) – contains
programs and information essential to
operation of the computer
􀂃 The information cannot be changed by use,
and is not lost when power is off
– It is called nonvolatile memory




The CPU is connected to memory and
I/O through strips of wire called a bus
􀂾 Carries information from place to place
􀂃 Address bus
􀂃 Data bus
􀂃 Control bus

􀂉 Address bus
􀂾 For a device (memory or I/O) to be
recognized by the CPU, it must be
assigned an address
􀂃 The address assigned to a given device must
be unique
􀂃 The CPU puts the address on the address bus,
and the decoding circuitry finds the device
􀂉 Data bus
􀂾 The CPU either gets data from the device
or sends data to it
􀂉 Control bus
􀂾 Provides read or write signals to the
device to indicate if the CPU is asking for
information or sending it information

􀂉 The more data buses available, the

better the CPU
􀂾 Think of data buses as highway lanes
􀂉 More data buses mean a more
expensive CPU and computer
􀂾 The average size of data buses in CPUs
varies between 8 and 64
􀂉 Data buses are bidirectional
􀂾 To receive or send data
􀂉 The processing power of a computer is
related to the size of its buses

The more address buses available, the
larger the number of devices that can
be addressed
􀂉 The number of locations with which a
CPU can communicate is always equal
to 2x, where x is the address lines,
regardless of the size of the data bus
􀂾 ex. a CPU with 24 address lines and 16
data lines can provide a total of 224 or 16M
bytes of addressable memory
􀂾 Each location can have a maximum of 1
byte of data, since all general-purpose
CPUs are byte addressable
􀂉 The address bus is unidirectional

CPU’s Relation to RAM and ROM

􀂉 For the CPU to process information,
the data must be stored in RAM or
ROM, which are referred to as primary
memory
􀂉 ROM provides information that is fixed
and permanent
􀂾 Tables or initialization program
􀂉 RAM stores information that is not
permanent and can change with time
􀂾 Various versions of OS and application
packages
􀂾 CPU gets information to be processed
􀂃 first form RAM (or ROM)
􀂃 if it is not there, then seeks it from a mass
storage device, called secondary memory, and
transfers the information to RAM