What is Computer?
A computer, whether a desktop or a laptop, is comprised of various hardware components.
Components of Computer

1. Microprocessor:
- A microprocessor serves as a decision-making unit, executing instructions received from a program.
- Regardless of the programming language used, every program relies on the microprocessor for execution.
2. Math Coprocessor:
- A specialized processor dedicated solely to executing mathematical instructions, including addition, subtraction, multiplication, and division.
3. Graphical Processing Unit (GPU):
- A dedicated processor with its own memory responsible for executing instructions required to display graphical data.
4. Storage Devices:
Storage devices are responsible for storing data, either temporarily or permanently. They are classified into two types: Primary storage and Secondary storage.
a) Primary Storage Device:
- These storage devices are directly accessible to the microprocessor.
- Examples include RAM and ROM.
RAM (Random Access Memory):
- A primary electrical storage device used to store data temporarily.
- Every program gets loaded into RAM for execution purposes.
ROM (Read-Only Memory):
- Initially, ROM is considered as RAM.
- Once data is permanently written inside RAM, it becomes ROM.
b) Secondary Storage Device:
- Secondary storage devices are used for permanent data storage.
- Data is initially stored in primary storage before being transferred to secondary storage.
- Examples include Hard Disk, SSD, CD, Floppy, etc.
Hard Disk:
- A secondary storage device used to store data magnetically.
- Files are stored in the hard disk when created.
5. Input Devices:
- Input devices are used to provide input to the computer.
- Keyboard and Mouse are examples of input devices.
- The keyboard is considered the Standard Input Device (stdin).
6. Output Devices:
- These devices are used to generate output.
- Console (Monitor) and Printer are examples of output devices.
- The console is considered the Standard Output Device (stdout).
7. Motherboard:
- The main Printed Circuit Board (PCB) of a computer.
- It connects all the computer components together.
- Communication between components occurs through the motherboard.
8. System Bus:
- Consists of wires used to connect devices to the motherboard.
- It is classified into three types based on usage: Address bus, Data bus, and Control bus.