0% found this document useful (0 votes)
44 views21 pages

Assembly Languge

This document discusses different types of computer languages. It begins by defining a computer language as a means of communication with a computer through instructions. There are four main types of computer languages: machine language, assembly language, high-level languages, and fourth generation languages. Machine language uses binary and is directly understood by computers, while assembly language uses mnemonic codes and must be translated. High-level languages are easier for humans to read and write but require translation. Interpreters translate line-by-line while compilers translate the entire program at once.

Uploaded by

Hajra Sadaqat
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)
44 views21 pages

Assembly Languge

This document discusses different types of computer languages. It begins by defining a computer language as a means of communication with a computer through instructions. There are four main types of computer languages: machine language, assembly language, high-level languages, and fourth generation languages. Machine language uses binary and is directly understood by computers, while assembly language uses mnemonic codes and must be translated. High-level languages are easier for humans to read and write but require translation. Interpreters translate line-by-line while compilers translate the entire program at once.

Uploaded by

Hajra Sadaqat
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/ 21

CHAPTER -1

COMPUTER LANGUAGE
DAY -1
What is a Language ?
 Human Language: Commonly used to express our
views, feelings and other person expression. It can be
oral or gestural kind of communication.
What is a Computer Language?

 A “computer language” is a way of communication with a


computer.
 To communicate with a computer we need a language that
a computer understands.
 For every action computer need instructions.
 The Instruction can be given by Program.

Contd..
What is a Program?
 A “Program” is a set of instructions that tells the computer
what to do.

 Example:-
Q. Write a program to display a word “Hello, world”.
Solution:
Print (“Hello, world”)

Note: Here Print( ) is a function to print the specified


message.
Contd..
 The process of writing specific instructions in a computer
language is called Programming.
 Each Programming language has its own specific rules.

Contd..
Types of Language

 The computer language is classified into Four (4)


types:
i) Machine Language
ii) Assembly Language
iii) High Level Language
iv) Fourth Generation Language
Machine Language (First Generation)
 It is the only language that a computer understands.
 It is expressed in binay form i.e 0’s and 1’s where 0 means
“OFF” state and 1 means “ON” state.
 It has very high speed and very low memory utilization.
 It is a machine-dependent.
 It is also known as Low Level Language(LLL).
Example of Machine Language
Assembly Language (Second Generation)
 It uses mnemonic codes or symbols in place of 0’s and 1’s.
 Example:
In binary language the operation code for ADD is 0100 in binary
language.
 It is easier to work with Assembly language than in machine
language.
How ???????

 It has to be converted into machine language by Translator


program(i.e called as Assembler).
Why ?????????
 It is a machine-dependent.
 It is also known as Low Level Language(LLL).
DAY -2
 A program written in assembly language is called
Source Program or Source Code.

 The program converted into machine language by the


assembler is called Object Program or Object Code.
Difference between Machine & Assembly Language

Machine Language Assembly Language

Uses binary codes to depict Uses Mnemonic Codes or


operators and data. Symbols instead of binary
numbers.

The only language directly Has to be converted into machine


understood by a computer. language by Assemblers.
High Level Language(Third Generation)
 It is simple and user friendly language.
 It is machine-independent.
 It is also known as High Level Language(HLL).
 It uses English words and Mathematical operators.
 Example: C,C++, Java, etc
 It has to be converted in machine language by using
Translator programs.
Types of Translator programs
There are Two types of Translator programs:
i)Interpreter
ii)Compiler
What is an Interpreter ?
 An interpreter translates line by line , executes the
instruction and then repeats the procedure for the
remaining instructions.
 In interpreter the execution speed of the program is slow
as compared to compiler.
 It is a translator program used to convert a high level
language program into machine language.
What is Compiler ?

 A Compiler translates the whole program at once.


 In Compiler the execution speed of the program is
very fast as compared to interpreter.
 It is a translator program used to convert a high level
language program into machine language.
Difference between Interpreter & Compiler
Interpreter Compiler

An Interpreter translates line by A Compiler translates the whole


line , executes the instruction and program at once.
then repeats the procedure for the
remaining instructions.

In Interpreter the execution speed In Compiler the execution speed


of the program is slow as of the program is very fast as
compared to compiler. compared to interpreter.
Fourth Generation Language
 It is highly user friendly.
 Machine independent.
 Very high speed of execution.
 Minimum efforts from the user to obtain any information.
ASSIGNMENT
1.What is a Computer Language ?
2. Define Program and Programming.
3. How many types of Computer languages are there ? Name them.
4.Define Machine Language.
5.How many types of Translator programs are there ? Name them.
6. Differentiate between :-
a) Machine & Assembly Language. (Only Two points)
b) Interpreter & Compiler. (Only Two points)

You might also like