Lecture 002

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Lecture 002

Anatomy of Digital Computers


Anatomy of Digital Computer
Central Processing Unit (CPU):
Memory
Input Devices
Output Devices
Storage
Anatomy of Digital Computer
Anatomy of Digital Computer
 Central Processing Unit (CPU)

• The ‘brain’ of the computer, the component that actually


executes instructions.

• A computer's CPU handles all instructions it receives from


hardware and software running on the computer.

• The CPU is also known as the processor or microprocessor.


Microprocessor
• The key element of all computers, providing the
mathematical and decision making ability.

• Current state-of-the-art microprocessors (Pentium,


Athlon, SPARC, PowerPC,Corei3, corei5 and Corei7).

• They operate at ultra-fast speeds – doing over a


billion operations every second.
Integrated Circuits
• Commonly known as an IC or a chip

• A tiny piece of Silicon that has several electronic


parts on it

• The smallest components on an IC are much smaller


than the thickness of a human hair
A microprocessor system?
• Microprocessors are powerful pieces of hardware, but not
much useful on their own

• Just as the human brain needs hands, feet, eyes, ears,


mouth to be useful; so does the microprocessor

• A microprocessor system is microprocessor plus all the


components it requires to do a certain task

• A microcomputer is 1 example of a microprocessor system


Microprocessors Building Blocks
Microprocessor
Data
Cache
Memory
Bus Control Arithmetic
RAM Bus Unit & Logic
Interface Unit
I/O Unit
Instruction Registers
System Decoder
Bus
Floating
Point
Unit
Instruction
Cache Registers
Bus Interface Unit
• Receives instructions & data from main memory

• Instructions are then sent to the instruction cache,


data to the data cache

• Also receives the processed data and sends it to


the main memory
Instruction Decoder
• This unit receives the programming instructions and
decodes them into a form that is understandable by
the processing units, i.e. the ALU or FPU

• Then, it passes on the decoded instruction to the


ALU or FPU
Arithmetic & Logic Unit (ALU)
• Also known as the “Integer Unit”

• It performs whole-number math calculations


(subtract, multiply, divide, etc) comparisons (is
greater than, is smaller than, etc.) and logical
operations (NOT, OR, AND, etc)

• The new brand of popular microprocessors have not


one but two almost identical ALU’s(Pentium4 and
PowerPC) that can do calculations simultaneously,
doubling the capability
Floating-Point Unit (FPU)
• Also known as the “Numeric Unit”

• It performs calculations that involve numbers


represented in the scientific notation (also known
as floating-point numbers).

• This notation can represent extremely small and


extremely large numbers in a compact form

• Floating-point calculations are required for doing


graphics, engineering and scientific work

• The ALU can do these calculations as well, but will


do them very slowly
Registers
• Both ALU & FPU have a very small amount of super-
fast private memory placed right next to them for
their exclusive use. These are called registers

• The ALU & FPU store intermediate and final results


from their calculations in these registers

• Processed data goes back to the data cache and


then to main memory from these registers
Control Unit
• The brain of the microprocessor

• Manages the whole microprocessor

• Tasks include fetching instructions & data,


storing data, managing input/output devices
Memories
1. RAM(Random Access Memory)
2. ROM(Read Only Memory)
3. Cache Memory
4. Register
RAM
• RAM is a form of computer data storage that
stores data and machine code currently being used.

• Which makes it possible to find specific information


very quickly.

• It is a form of fast-access, volatile storage that


is used as the main memory in computer systems.
ROM (Read Only Memory)
• As the name indicates, data stored in ROM may only
be read.

• It is either modified with extreme difficulty or not at


all.

• ROM stores the instructions for the computer to


start up when it is turned on again.
Types of Rom
1. PROM.
2. EPROM.
3. EEPROM.
4. Flash memory.
PROM
• Short for programmable read-only memory.
• Purchased blank.
• A memory chip on which data can be written only once.
• Once a program has been written onto a PROM, it remains
there forever.
• The difference between a PROM and a ROM (read-only
memory) is that a PROM is manufactured as blank memory,
whereas a ROM is programmed during the manufacturing
process.
• To write data onto a PROM chip, you need a special device
called a PROM programmer or PROM burner.
• The process of programming a PROM is sometimes called
burning the PROM.
EPROM
• Purchased blank.
• Erasable programmable read-only memory.
• Special type of PROM that can be erased by
exposing it to ultraviolet light.
• Once it is erased, it can be reprogrammed
again and again.
• But all the memory location will be erased.
• Selective location cant be erased.
EEPROM
• Electrically Erasable programmable read only
memory.
• Also like other types of ROM, EEPROM is not
as fast as RAM.
• A special type of EEPROM, referred to as flash
memory or flash EEPROM,
• Can be rewritten while it is in the computer
rather than requiring a special device called a
PROM reader.
• Can reprogrammed inside the circuit it is used.
EEPROM
• An EEPROM is similar to a PROM, but requires
only electricity to be erased.
• Specific memory location can be erased in
EEPROM.
Solution to the Bottleneck Problem
• Make the main memory faster.

• Problem with that approach: The 1-ns memory is


extremely expensive as compared the currently popular
100-ns memory.

• Another solution: In addition to the relatively slow main


memory, put a small amount of ultra-fast RAM right next to
the microprocessor on the same chip and make sure that
frequently & recently used data and instructions resides in
that ultra-fast memory.

• Advantage: Much better overall performance due to fast


access to frequently-used data and instructions.
On-Chip Cache Memory (1)
• That small amount of memory located on the same
chip as the microprocessor is called On-Chip Cache
Memory.

• The microprocessor stores a copy of frequently


used data and instructions in its cache memory.

• When the microprocessor desires to look at a piece


of data, it checks in the cache first. If it is not there,
only then the microprocessor asks for the same
from the main memory.
On-Chip Cache Memory (2)
• The small size and close proximity to the
microprocessor makes access times short, resulting
in a boost in performance (it is easy to find things in a small box placed
next to you).

• Microprocessors predict what data will be required


for future calculations and pre-fetches that data and
places it in the cache so that it is available
immediately when the need arises.

• The speed-advantage of cache memory is greatly


dependent on the algorithm used for deciding
about what to put in cache or not.
Registers
• A register is a very small amount of very
fast memory that is built into the CPU (central
processing unit).

• ISn order to speed up its operations by providing


quick access to commonly used values.
Secondary Storage Devices
• Secondary memory is computer memory that is
non-volatile.
• Not directly accessed by computer/processor.
• Secondary memory consists of all permanent or
persistent storage devices.
• Such as read-only memory (ROM), flash drives,
hard disk drives (HDD), USB, magnetic tapes and
other types of internal/external storage media.
• In computing operations, secondary memory is
accessed only by the primary or main memory
and later transported to the processor.
Differences
• Primary memory is directly accessible by Processor/CPU.
 Secondary memory is not directly accessible by CPU.
• Main memory.
 Auxiliary memory.
• Instructions or data to be currently executed are copied to
main memory.
 Data to be permanently stored is kept in secondary memory.
• Primary memory is usually volatile.
 Secondary memory is non-volatile.
• Primary memories are made of semiconductors.
 Secondary memories are made of magnetic and optical
material.
Differences
• Accessing data from primary memory is faster.
 Accessing data from secondary memory is slower.
• Computer has a small primary memory.
 Computer has a larger secondary memory.
• Primary memory is costlier than secondary memory.
 Secondary memory is cheaper than primary memory.
• Primary memory is an internal memory.
 Secondary memory is an external memory.
Units of Memory
• Bit
• Nibble
• Byte
• KB
• MB
• GB
• TB
binary digit
Nibble

1 Nibble=4bits
Byte = 8 bits
Kilobyte

1 KB=1024 Bytes
Megabytes

1 MB=1024 KB
Gigabytes

1 GB=1024 MB
Terabytes

1 TB=1024 GB

You might also like