Chapter 2 : Computer Hardware
Topics covered in this snack-sized chapter:
The main parts of a personal computer include following:
The CPU, Memory, Devices
Arithmetic/Logic Unit (ALU)
Control Unit (CU)
Interface Unit
Primary storage
Secondary storage
A Peripheral is a device attached to a host computer, but not a part of it.
Examples include Input/output devices like:
The central processing unit (CPU) is the
brain of a computer system.
It carries out the instructions of a
computer program: Performs the basic arithmetical, logical, and input/output operations of the system.
Below chart depicts all the components of the CPU:
ALU (Arithmetic Logic Unit)
Performs arithmetic and logical operations.
Arithmetic operations include:
- Addition, Subtraction, Multiplication and Division
Logic includes:
Performs fetch/execute cycle.
Accesses and retrieves program instructions from the memory and issues commands to the ALU.
Moves data to and from the CPU, registers, and other hardware components.
Registers:
- All modern CPUs have an array of registers.
- There are at least 32 general purpose registers.
- The register can be accessed in one CPU cycle.
- The register serves as the source of operands, as the destination of results, and temporarily stores intermediate results.
Memory management unit:
- Manages fetching of instructions and data from memory.
Provides the mechanism for the input/output of data.
Sometimes combined with memory management unit in a single Bus Interface Unit.
Memory can be classified into two groups.
It is a smaller segment of memory for storing program and data.
The internal memory of a computer system uses electronic semiconductor devices called ROM and RAM.
It is used for long term storage of data.
Floppy disk and hard disk are examples.

RAM is the memory part of a computer that stores information temporarily while the computer is on.
It is this region into which programs are loaded before the CPU processes those informations.
RAM is volatile in nature, which means that the contents are lost once the power supply is switched off.
Two types of RAM are:
SRAM is a type of memory that maintains data in storage as long as it is powered.
Because it is faster and more reliable and expensive than DRAM
DRAM is a type of random-access memory that stores each bit of data in a separate capacitor within an integrated circuit.

It is a Read Only Memory.
Program or data stored in the ROM can only be read; they cannot be altered.
ROM is non-volatile which means that the contents are not changed when the power is switched off.
Types of ROMs:
An EPROM (rarely EROM), or erasable programmable read only memory, is a type of memory chip that retains its data when its power supply is switched off. In other words, it is non-volatile.
EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory.
It is used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration tables or device configuration.
Buses are the set of wires that carry special information to or from the CPU.
There are three types of buses:
- Address buses: These buses carry address given by the CPU from one unit to another in the computer.
- Data buses: These buses carry data from one unit to other; it is a bi-directional bus i.e. the data can be carried in both directions.
- Control signal: These buses carry control signal from ALU to memory and from memory to ALU and then to the output unit.