Python LEC 2
Python LEC 2
1 INTRODUCTION
In computer programming, languages are classified based on how close they are to human
language or machine code. This classification helps us understand how we interact with the
computer and how the computer understands our instructions. The two main types of
programming languages are High-Level Languages and Low-Level Languages.
2 LOW-LEVEL LANGUAGES
2.1 DEFINITION:
Low-level languages are programming languages that are closer to machine code (binary). They
provide little or no abstraction from a computer’s instruction set architecture.
1. Machine Language:
o The most basic form of code, written in binary (0s and 1s).
o Directly executed by the computer’s CPU.
o Example: 10110000 01100001
o Difficult to write, read, and debug.
2. Assembly Language:
o A slight improvement over machine code.
o Uses symbolic code (mnemonics) like MOV, ADD, SUB to represent machine-level
instructions.
o Requires an assembler to convert to machine code.
2.4 DISADVANTAGES:
3.1 DEFINITION:
High-level languages are closer to human languages and abstract away the hardware details.
They are designed to be easy to read, write, and maintain.
3.2 EXAMPLES:
Python
Java
C++
PHP
JavaScript
3.3 FEATURES:
3.5 DISADVANTAGES:
4 CONCLUSION
Understanding the difference between high-level and low-level languages is essential in
choosing the right tool for programming tasks. High-level languages are best for application
development due to their simplicity and portability, while low-level languages are used when
performance and hardware control are critical.