1.
History of Programming Languages
Computers only understand binary (0s and 1s). Programming languages developed over time to
make it easier for humans to communicate with computers.
- First Generation (Machine Language):
Written in 0s and 1s (e.g., 10110100 01100001). Example: ENIAC in the 1940s. Very difficult to
program.
- Second Generation (Assembly Language):
Used mnemonics like ADD, SUB instead of binary. Example: "MOV A, 5". Required an assembler.
- Third Generation (High-Level Languages):
Closer to human language, e.g., C, Java, Python. Example: total = a + b;
- Fourth Generation (4GL):
Easier, often database-oriented. Example: SQL → SELECT name FROM students WHERE age >
18;
- Fifth Generation (5GL):
AI-based, e.g., Prolog, Lisp. Used for robotics, AI, machine learning.
2. Types of Programming Languages
- Low-Level Languages: Machine language and Assembly (fast, but hard to read).
- High-Level Languages: C, Java, Python (easy to use, platform-independent).
- Procedural Languages: Focus on step-by-step instructions. Example: C, Pascal.
- Object-Oriented Languages: Based on objects and classes. Example: Java, Python.
- Scripting Languages: For automation and web. Example: JavaScript, Python.
3. History of Programming Errors
Errors in programming are called 'bugs'.
Origin: In 1947, a moth was found stuck in the Harvard Mark II computer relay, causing failure.
Engineers called it a "bug"—the first recorded case.
Today: IDEs like PyCharm and Visual Studio catch syntax errors quickly.
Example:
Python code → print("Hello)
Error: missing quotation → syntax error.
4. Types of Programming Errors
- Syntax Errors: Breaking language rules. Example: Missing semicolon in C.
- Runtime Errors: Happen while program runs. Example: Division by zero.
- Logical Errors: Program runs but gives wrong output. Example: Using + instead of * in area
calculation.
- Semantic Errors: Wrong meaning. Example: price + discount instead of price - discount.
5. Hardware & Software of a Computer System
Hardware: Physical components (input, output, storage, CPU, GPU).
- Input devices: Keyboard, Mouse.
- Output devices: Monitor, Printer.
- Storage devices: HDD, SSD.
- Processing devices: CPU, GPU.
Software: Instructions for the computer.
- System Software: Operating systems (Windows, Linux), utilities (antivirus, disk cleanup).
- Application Software: MS Word, Photoshop, VLC player.
Utilities: Tools for system maintenance (antivirus, file compression, backup tools).
Example: Disk Cleanup removes temporary files to speed up a PC.