Theory:

Central Processing Unit (CPU):
The Control unit, Memory unit and Arithmetic Logical Unit (ALU) are together known as CPU. CPU is the brain of amcomputer system.The data is processed in the CPU.
 
CPU performs the following tasks:
  • It performs all operations.
  • It takes all decisions.
  • It controls all the units of the computer.
Control Unit:
The control unit controls all the units of the computer . It controls the flow of data and instructions to and from the storage unit to the Arithmetic and Logic Unit (ALU). All devices or parts of the computers are interacting through this unit only. Thus, it is also known as the central nervous system of the computer.
 
vN1.gif
 
Arithmetic Logic Unit (ALU):
The ALU can do basic arithmetic operations such as addition, subtraction, division, multiplication and logical operations (such as and, or, not, equal to, greater than and less than, etc). The control unit sends the data from the storage unit to ALU, whenever computations are needed. When the operations are completed, the result is transferred back to the storage unit.
The ALU is divided into the Arithmetic Unit (AU) and the Logic Unit (LU). AU Performs the arithmetic operations, and LU performs the logical operations.
 
Memory unit:
All input data, instructions and temporary data to the processes are stored in the memory.
 
Memory is generally classified into two types –
  • Primary memory and
  • Secondary memory
Primary memory:
The computer memories which are directly accessed by the processor using the data bus are called primary memory. Primary memory resides within the CPU. It permits a processor to access stored running programs and currently processed data stored in a memory location
 
Examples:
  • RAM (Random Access Memory) is used as primary storage memory. It is used for the temporary storage of data. When the computer is switched off, the data will be lost (Volatile Memory).
  • ROM (Read Only Memory) is a type of non-volatile memory (When the computer is switched off, the data will not be lost) used in computers. ROM is useful for storing data and instruction for start-up the computer and software that is rarely changed during the life of the system, also known as firmware.
800px-Swissbit_2GB_PC2-5300U-555.jpg
(a) RAM
Una_EPROM_con_cancellazione_dei_dati_mediante_raggi_UV.jpg
(b) ROM
  
Secondary memory:
Secondary memory is the storage device that is used to store data the permanently. It is also known as removable storage media.
  
Examples:
  • Solid-state storage devices - USB memory sticks.
  • Optical storage devices - CD, DVD and Blu-ray discs.
  • Magnetic storage devices - Hard disk drives.
Seagate_Hard_Disk.jpg
download.jpg
usb_stick.jpg
564px-Flash_memory_cards_size.jpg
  
Secondary memory is a non-volatile memory (data with or without electrical power). It is slower and cheaper than primary memory.
 
Important!
Note: Input provided to the computer is called as data, and the output generated after processing the input, based on the instructions specified by the users, is called as information. Raw facts and figures which can be processed using arithmetic and logical operations to obtain information are called data.
Reference:
https://commons.wikimedia.org/wiki/File:Swissbit_2GB_PC2-5300U-555.jpg
https://commons.wikimedia.org/wiki/File:Una_EPROM_con_cancellazione_dei_dati_mediante_raggi_UV.jpg
https://commons.wikimedia.org/wiki/File:Seagate_Hard_Disk.jpg
https://pxhere.com/en/photo/1437937
https://www.freeimageslive.co.uk/files/images010/usb_stick.jpg
https://commons.wikimedia.org/wiki/File:Flash_memory_cards_size.jpg