Computer Languages
Computer Languages
Saket Srivastav
Assistant Professor(IT)
Introduction
[Lecture No. 1 ]
1
Computer Languages
Definition: Machine language is the lowest-level programming language, consisting entirely of binary code (0s and
1s).
Characteristics:
Directly Executable: Machine language is executed directly by the computer's CPU.
CPU-Specific: It is specific to a particular computer architecture, meaning that programs written for one type of CPU
won't work on another.
Difficult to Program: Writing in machine language is complex and error-prone, requiring detailed knowledge of the
hardware.
Example: A simple instruction in machine language might look like 10110000 00000001, which could represent a
command to move a value to a register
2
Computer Languages
Definition: Assembly language is a low-level language that uses symbolic representations (mnemonics) to represent
machine-level instructions.
Characteristics:
Human-Readable: Assembly language is more understandable than machine language, using mnemonic codes (like
MOV, ADD, SUB) instead of binary.
Specific to Architecture: Each assembly language is designed for a specific CPU architecture.
Requires Assembler: Assembly language needs to be translated into machine language using an assembler before
execution.
Example: An assembly language instruction might look like MOV AX, 01h, which moves the hexadecimal value 01
into the AX register.
3
Computer Languages
High-level languages provide abstraction from the hardware and allow programmers to write code that is more
understandable and portable across different systems.
Characteristics:
Human-Readable: Syntax is closer to natural language, making it easier to learn and use.
Portability: Programs can run on different types of machines with minimal modification.
Rich Libraries and Frameworks: Many high-level languages come with extensive libraries to simplify programming
tasks.
Examples:
FORTRAN (1957): Primarily used for scientific and engineering calculations. It introduced concepts like variables and
control structures.
COBOL (1959): Designed for business applications, emphasizing data processing and file handling.
C (1972): Known for system programming, it offers low-level access to memory while still being easier than assembly
language. It's widely used in developing operating systems and embedded systems.
Pascal (1970): Developed for teaching programming concepts, it emphasizes structured programming and data
types.
4
Computer Languages
These languages are designed to solve specific problems in various domains, focusing on productivity and ease of
use.
Characteristics:
Higher Abstraction Level: They allow users to express what they want to achieve without specifying how to do it.
Domain-Specific: Many fourth-generation languages are tailored for particular tasks or industries.
User-Friendly: They often come with graphical interfaces and visual programming environments.
Examples:
SQL (Structured Query Language): Used for managing and manipulating relational databases. It allows users to write
queries to retrieve data without needing to know the underlying database structure.
MATLAB: Primarily used for mathematical computations, simulations, and data visualization, especially in
engineering and scientific research.
R: A programming language used for statistical computing and graphics, widely used among statisticians and data
analysts.
5
Computer Languages
6
Computer Languages