0% found this document useful (0 votes)
3 views2 pages

Programming Languages Notes

The document outlines the evolution of programming languages from machine language to AI-based languages, categorizing them into five generations. It also discusses various types of programming languages and errors, including syntax, runtime, logical, and semantic errors. Additionally, it describes the hardware and software components of a computer system, highlighting their functions and examples.

Uploaded by

muiyasiamo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Programming Languages Notes

The document outlines the evolution of programming languages from machine language to AI-based languages, categorizing them into five generations. It also discusses various types of programming languages and errors, including syntax, runtime, logical, and semantic errors. Additionally, it describes the hardware and software components of a computer system, highlighting their functions and examples.

Uploaded by

muiyasiamo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

You might also like