Chapter 2
Basic Computer Organization,
Processor and Memory Unit
Computer Organization
• Input Unit
• Output Unit
• System Unit
• Storage Unit
• Arithmetic Logic Unit
• Control Unit
• Central Processing Unit (CPU)
• Memory/Storage Unit
System Unit
Chapter 2 - Components of the System Unit
System Unit
• System unit is the main body of the computer
• It is a case that contains different electronic components of the computer
• These components include
• Central Processing Unit
• Memory (i.e. RAM, ROM)
• Disk drives
• Power supply
• Computer fan
• Other electronic components
• All these components are connected to motherboard inside the system unit
System Unit
Central Processing Unit (CPU)
•Simply called a CPU
•It is the most important component of the
computer
•Also known as a processor
•CPU is considered as the brain of the computer
•It performs different operations on data
according to given instructions
Central Processing Unit (CPU)
Components of CPU
• Control Unit (CU)
• Control unit is the most important component of CPU
• It controls and coordinates most of the operations in computer and its
different components
• For example, control unit receives data and instructions from input device and
stores them in main memory. Similarly, it sends output to output device.
• Control unit also controls execution of instructions of program
• Arithmetic Logic Unit (ALU)
• It performs arithmetic and logical operations on data
• Arithmetic operations ALU performs addition, subtraction, multiplication, and
division
• Logical operations ALU compares numerical data as well as alphabetic data
• For example, it checks whether first number is greater than second, less than second or
equal to second, etc.
Registers
• A processor contains small, high-speed storage locations
• These storage locations are called registers
• Registers are used during program execution
• They temporarily hold instructions, data, or intermediate results of
calculations
Machine Cycle
• Process by which CPU obtains a program instruction from memory, decodes &
executes it, and stores result in memory (if necessary)
• Also known as instruction cycle
• CPU performs four basic operations to take action on each instruction of
program
• These operations are fetching, decoding, executing, and storing (if necessary)
Machine Cycle
Fetching
• Control unit obtains an instruction (or data item) from memory for taking
action on it
Decoding
• Control unit translates instruction into signals so that computer can
understand it
Executing
• Control unit takes action on decoded instruction
Storing
• Control unit may be required to store results of executed instruction in
memory (but this condition is not always required)
System Clock
• System clock is an electronic component
• It controls the timing of all operations of computer
• It generates regular electronic pulses or ticks
• It is just like your heart that beats at a regular rate to keep your body
functioning
• It is because computer clock is known as heart of the computer
• Each tick or pulse is known as clock cycle
Memory Unit
Chapter 2 - Components of the System Unit
Memory Unit
• A component of computer that is used to store data
and instructions is called memory
• Personal computer contains a main memory
• Before processing data, control unit must load data
and instructions in main memory
• Main memory is also known as working area of the
computer
• A computer cannot work without having main memory
Memory Unit
Structure of Main Memory
• Main memory of a computer consists of thousands or millions of cells
• Each cell can store a bit (Binary digit)
• A bit represents 0 or 1
• These cells are logically organized into a group of 8 bits called a byte
• Each byte exists temporarily in a specific memory location that has an address
• The address is a unique number that identifies the location of a byte in
memory
Memory Unit
Memory Size
• Storage capacity of memory is expressed in terms of number of bytes
• The data and program sizes are also measured in bytes
• Today, computer memories are available up to a terabyte
• In near future, memories will be available up to Yottabytes (YB)
Types of Memories
Volatile Memory
• A type of computer memory that requires continuous power (electricity) to
maintain stored information
• In this type of memory, data and instructions are stored temporarily
• It loses its contents (stored information) when computer is turned off
• So it is a temporary memory
• Examples RAM, cache memory, and CPU registers
Non-Volatile Memory
• A type of computer memory that can maintain (retain) stored information even
when power supply is off (or interrupted)
• In this type of memory, data and instructions are stored permanently
• It does not lose its contents when the computer is turned off
• So it is a permanent memory
• Examples ROM, flash memory, and all secondary storage devices
RAM
• RAM stands for Random Access Memory
• It is used in a computer for storage of active programs and data
• Processor can directly write and read information (data & instructions) to and from
RAM
• Read/write memory because processor can write and read information (data
and instructions) to and from it
• RAM is a primary memory
• Data and instructions are stored in it temporarily
• RAM is a volatile memory
• It means that data and programs stored in RAM are lost when the power is turned off
• Information must be saved on storage devices for later use
• The storage capacity of RAM is measured in bytes
• In PCs, size of RAM is 4GB to 32 GB or more
• More RAM size means computer can use a powerful program with a large size
• It also improves performance of computer
ROM
• ROM stands for Read Only Memory
• It is a memory chip in which data and instructions can be stored permanently
• Data and instructions stored in ROM can only be read
• This is the reason why it is called read only memory
• However, in some types of ROM chips data and instructions can be erased and reprogrammed
• ROM is a non-volatile memory
• It means that its contents are not lost when the computer is turned off
• Manufacturers of ROM chips often record data and instructions on ROM chips when they manufacture
chips
• These ROM chips are called firmware
• When computer is switched on, instructions in ROM chip are automatically activated and prepare
computer for use
Difference between RAM and ROM
ROM RAM
• Read only Memory • Random Access Memory
• Permanent Memory • Temporary memory
• Non-volatile Memory • Volatile memory
• Manufacturer of ROM can only • User can read and write data and
write data and programs into it at its programs into it at any time during
manufacturing time data processing
• Small storage capacity • Large storage capacity
• Data is written into it using special • Data is written into it using electrical
devices and ultraviolet rays devices
Cache Memory
• Processor obtains data and instructions from RAM during data processing
• Often processor obtains same data or instructions from RAM again and again
(or repeatedly)
• In this way, a lot of time of processor is wasted for obtaining same data or
instructions from memory
• So performance of processor is affected
• Cache memory is a very small but very fast memory
• It is used to improve the performance of the processor (or computer system)
• Some cache memories are built inside processor (CPU) and some are separate
chips on motherboard and are located between RAM and CPU
• CPU stores frequently used instructions and data in cache memory
• When CPU needs a specific data or program instruction, it quickly obtains
from cache memory
• So cache memory speeds up the working of CPU