Unit 1: Introduction to Computer
Introduction to Computer
A computer is an electronic machine that receives data (input), processes it using a set of instructions (programs), and produces meaningful information (output).
It works on the principles of:
- Input
- Processing
- Output
- Storage
A computer follows the IPO cycle and executes tasks at very high speed with accuracy.
Characteristics of Computers
- Speed: Millions of operations per second.
- Accuracy: Very low error rate.
- Automation: Works automatically after instructions are given.
- Storage: Can store vast amounts of data.
- Versatility: Used in various fields (banking, education, defense, etc.).
Computer Hardware & Software
1. Computer Hardware
Hardware refers to the physical parts of a computer system that you can touch and see.
Examples: Keyboard, Mouse, Monitor, CPU, Hard Disk, RAM, Motherboard, Printer, etc.
Major Hardware Components
A. Input Devices
These allow the user to enter data into the system.
Common Input Devices
| Device | Function |
|---|---|
| Keyboard | Enters text and commands |
| Mouse | Controls cursor, selects items |
| Scanner | Converts physical documents into digital form |
| Microphone | Inputs audio/sound |
| Webcam | Inputs video/images |
| Barcode Reader | Reads barcodes |
| Touch Screen | Acts as both input and output |
B. Output Devices
These devices display the processed information to the user.
Common Output Devices
| Device | Description |
|---|---|
| Monitor (LED/LCD) | Displays text, images, videos |
| Printer | Produces hard copies of documents |
| Speaker/Headphones | Produces sound output |
| Projector | Displays output on large screens |
C. Central Processing Unit (CPU)
CPU is the brain of the computer. It performs all calculations, processing, and decision-making.
CPU Components
- Arithmetic and Logic Unit (ALU) - Performs mathematical operations (add, subtract) and logical operations (AND, OR, NOT).
- Control Unit (CU) - Manages and controls all activities of the computer., Acts like a supervisor.
- Registers - High-speed small memory used for quick data access.
D. Memory
Memory stores data, instructions, and output temporarily or permanently.
1. Primary Memory (Main Memory)
Directly accessed by CPU. Fast but limited.
Types of Primary Memory:
-
RAM (Random Access Memory):
Temporary memory; data erased when power goes off.
Types: DRAM, SRAM. -
ROM (Read Only Memory):
Permanent memory; stores booting instructions.
Types: PROM, EPROM, EEPROM.
2. Secondary Memory
Used for long-term storage. Large capacity but slower than primary memory.
Examples:
- Hard Disk Drive (HDD)
- Solid State Drive (SSD)
- CD/DVD
- Pen Drive
- Memory Card
- External HDD
Computer Software
Software is a set of programs, instructions, and procedures that tell the hardware how to operate.
Software cannot be touched physically; it provides functionality to the system.
Types of Software
A. System Software
Controls and manages computer hardware. Works as an interface between hardware and user.
Components of System Software:
-
Operating System (OS)
Examples: Windows, Linux, macOS, Android, iOS
Functions:-
Manages files
-
Manages memory
-
Manages hardware
-
Manages processes
-
-
Device Drivers - Special programs that allow OS to communicate with hardware. Example: Printer driver, audio driver, graphics driver.
-
Utility Software- Helps in maintenance and optimization.
Examples:-
Antivirus
-
Disk Cleanup
-
Backup tools
-
File compression (WinRAR)
-
B. Application Software
Programs created for the user to perform specific tasks.
Types:
-
General Purpose
-
MS Office (Word, Excel, PowerPoint)
-
Web browsers (Chrome, Firefox)
-
Media players
-
-
Special-Purpose Applications
-
Tally (Accounting)
-
AutoCAD (Designing)
-
SAP (ERP)
-
Hospital Management Software
-
-
Web & Mobile Applications
-
Instagram
-
WhatsApp
-
Online banking apps
-
Summary Table for Quick Revision
| Category | Description | Examples |
|---|---|---|
| Hardware | Physical parts of computer | Keyboard, CPU, Monitor |
| Input Devices | Enter data into computer | Mouse, Scanner |
| Output Devices | Display output | Monitor, Printer |
| CPU | Brain of computer | ALU, CU, Registers |
| Primary Memory | Fast, temporary | RAM, ROM |
| Secondary Memory | Permanent storage | HDD, SSD |
| System Software | Manages hardware | OS, Drivers |
| Application Software | Performs user tasks | MS Office, Tally |
Best for MCA Notes (Extra Explanation)
- Hardware = body of the computer
- Software = mind of the computer
- Without software, hardware is useless
- Without hardware, software cannot run
- Together, they make the computer functional
Computer Languages
A computer language is a system of communication used to write instructions that a computer can understand and execute.
Humans speak natural languages (English, Hindi), while computers understand binary (0s and 1s).
Computer languages act as a bridge between humans and computers.
Types of Computer Languages
A. Machine Language (Low-Level)
- The lowest-level language.
- Written in binary (0 and 1).
- Directly understood by the CPU.
- Very fast but difficult for humans.
Example:
B. Assembly Language
- Uses mnemonic codes (short words) instead of binary.
- Easier than machine language.
- Requires an Assembler to convert to machine code.
Example:
C. High-Level Languages (HLL)
- Human-readable languages like C, Java, Python.
- Portable (can run on different machines).
- Requires Compiler or Interpreter.
Examples:
- C, C++, Java
- Python, PHP
- C#, JavaScript
Translator Programs
Translators convert high-level or assembly code into machine code.
A. Compiler
- Converts the entire program into machine code at once.
- Shows errors after full compilation.
- Faster execution because full code is already converted.
Examples: GCC for C, javac for Java.
Features
- Translates whole program
- Creates an executable (.exe)
- Faster at runtime
B. Interpreter
- Converts and executes code line-by-line.
- Stops at the first error.
- Slower overall, but useful for beginners/testing.
Examples: Python interpreter, JavaScript engine.
Features
- Line-by-line execution
- No separate executable
- Slower but easier for debugging
C. Assembler
- Converts Assembly Language → Machine Language.
- Works with mnemonics like MOV, ADD, SUB.
Used for embedded systems and hardware-level programming.
Problem-Solving Concepts
Problem solving means breaking down a task into smaller steps to reach a solution.
In programming, this is done using:
- Algorithms
- Flowcharts
- Pseudocode
Algorithms
An algorithm is a step-by-step procedure to solve a problem.
Example: Algorithm to add two numbers:
- Start
- Input A and B
- Add A and B → Sum
- Display Sum
- Stop
Characteristics of a Good Algorithm
| Characteristic | Meaning |
|---|---|
| Clear & Unambiguous | Each step must have one meaning |
| Input Specified | Algorithm may take zero or more inputs |
| Output Specified | Must produce at least one output |
| Finite Steps | Must end after limited steps |
| Effective | Steps must be simple and executable |
| Language Independent | Not tied to any programming language |
Limitations of Algorithms
- Not suitable for problems requiring AI/judgment/creativity
- Complex algorithms can become lengthy
- Cannot handle ambiguous or emotional problems
- Some real-world issues cannot be broken into finite steps
Conditions in Pseudocode
Pseudocode uses simple English-like statements to represent logic.
Decision/Conditional Statements
If Statement
Example:
If–Else
Nested If
Switch/Case
Loops in Pseudocode
Loops repeat steps until a condition is met.
A. While Loop
Used when the number of repetitions is unknown.
Example:
B. For Loop
Used when the number of repetitions is known.
Example:
C. Repeat…Until Loop
Executes the loop at least once.
Example:
Summary Table
| Concept | Explanation |
|---|---|
| Computer Languages | Machine, Assembly, High-level |
| Compiler | Converts whole program at once |
| Interpreter | Line-by-line execution |
| Assembler | Converts assembly to machine code |
| Algorithm | Step-by-step solution |
| Characteristics | Clear, finite, effective |
| Pseudocode Conditions | IF, IF-ELSE, SWITCH |
| Loops | FOR, WHILE, REPEAT |