Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
93 views15 pages

FOC&DH

A computer language allows communication between a user and computer. Programming languages have limited vocabularies compared to human languages. Machine language uses binary code understood directly by CPUs. Assembly language uses symbols instead of binary but requires hardware knowledge. High-level languages are machine-independent and easier for programmers through use of familiar words and symbols. Translators like assemblers, compilers, and interpreters are used to convert programs between machine and other languages.

Uploaded by

Om Ahuja
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views15 pages

FOC&DH

A computer language allows communication between a user and computer. Programming languages have limited vocabularies compared to human languages. Machine language uses binary code understood directly by CPUs. Assembly language uses symbols instead of binary but requires hardware knowledge. High-level languages are machine-independent and easier for programmers through use of familiar words and symbols. Translators like assemblers, compilers, and interpreters are used to convert programs between machine and other languages.

Uploaded by

Om Ahuja
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 15

COMPUTER

LANGUAGE

A language is a system of communication with our


language such as english ,hindi and mother
tongue.We communicate our ideas,thoughts
emotions to another person.A computer language is
a means of communication between the user and the
computer.The computer language is also the
interface between hardware and user.A programmer
or user tells the computer what he want to do.
In other words a computer programming language is
a set of rules that tells the computer what operations
to perform.
The main difference between the natural language
and the human language is that the computer
language is having the limited vocabularies and
human language is having an unlimited
vocabulary.The reason behind this is that the
programming by its very nature and purpose does
not need to say much.Each and every problem to be
solved is broken down into discrete i.e simple and
seperate parts.
Logical steps are followed which basically consists of
4 fundamental operations:
1) Input and output operations.
2) Airthmetic operations.
3) Movement of information within the C.P.U.
4) Logical and comparison operations.

MACHINE
LANGUAGE
The set of instruction code whether in binary or
decimal which can be directly understood by
the C.P.U of a computer without a help of
translating programme is called machine code
or machine labguage.This is the basic language
of the computer representong data as 1 and
0.Machine language programmes are machine
independent.

Machine code is the fundamental language of a


computer.A computer is wired in such a way
that immediately recognized the machine
language and converts them in the form of
output.

An instruction prepared in any machine


language has two parts.
1) The first part is known as OPCODE this
means the command or operation which tells
computer what functions to perform.
2) The second part is known as OPERAND
which tells the instructions to the computer
wher to find and store the data or other
instructions that are to be manipulated.
The typical operations included in the
instruction set of a computer are:
1) Airthmetic operations.
2) Logical operations.
3) Branch operations for transfer of control to
the address given in the OPERAND field.
4) Data movement operation for moving data
between memory locations and registers.
5) Data movement operations for moving dat
from input and output devices.

ADVANTAGES:
The main advantage is programme written in
machine language can be executed very fast
by the computer.As machine instructions are
directly understood by the C.P.U and no
translation of the program is required.

DISADVANTAGES:
There are several disadvantages of writing a
program in a machine language:
1) Machine dependent.
2) Error prone.
3) Difficult to modify.
4) Difficult to programme.
ASSEMBLY
LANGUAGE

DEFINITION:
A language that allows instructions and store
locations to be represented by letters and
symbols instead of number is called assembly
language or synbolic language.

Assembly language is one step ahead of


machine language.It is called low level
language and allows the programmer to use
abbreviations or wors instead of binary
numbers.Each assembly language statement is
translated into 1 machine language instruction
by the assembler programme.The programmer
should have the thorough knowledge of the
computer architecture.

Assembly language programmas should be


well documented otherwise extremely difficult
to maintain.

Assembly language are hardware


dependent.System software as operating
system,database management etc were
written in asssembly language to maximize the
machine performance.

Assembly language programming introduced in


1952,helps in overcoming these limitations of
machine language programming in the
following manner.
1) By using numeric menemonic codes instead
of numeric codes for the instructions in the
instruction set.
For ex: ADD instead of 1110 (binary) or
(14)decimal.
SUB instead of 1111 (binary) or (15) decimal.
2) By allowing addresses of fixed storage
location may be represented by alpha numeric
names instead of numeric addresses.
For ex: memory locations 1000,1001,1oo2 are
represented as FRST,SCND,ANSR respectively.

3) By providing additional instructions called


PSEUDO instruction in the instructions set for
instructing the system how we want the
program to be assembled.
SET ASIDE AN ADDRESS FOR FRST.
SET ASIDE AN ADDRESS FOR SCND.
SET ASIDE AN ADDRESS FOR ANSR.
with this feature a prigrammer need not to
keep track of storage location of the data and
instruction while writing an assembly language
programme.

ADVANTAGES:
1) Easier to understand and use.
2) Easy to locate and correct error.
3) Easier to modify.
4) No need to track addresses.
5) Easily locatable and reallocatable.

DISADVANTAGES:
1) Machine dependent.
2) Knowledge of hardware.
3) Machine level coding.

HIGH LEVEL
LANGUAGE

This is also known as third


generation language.

1) They are machine independent i.e our


programme written in a higu level language
can be ported and executed easily on any
computer having a translator software for higu
level language.

2) They do nat require programmers to know


anything about the internal structures of the
computer on which the high level language
programmes are executed.

3) They do nat deal with machine level coding


rather they deal with high level coding inabiling
the programmers to write instructions using
english words and familiar mathematical
symbols and expressions.

High level language are also known as problem


oriented language....They allow the
programmers to write statements in which
problem is solved ratger than computer
oriented...
ex:C,C++,COBOL,FORTAN.

ADVANTAGES:
1) Machine independent.
2) Easy to learn at use.
3)Few errors.
4) Lower programming cost.
5) Better documentation.
6) Easier to maintain.

DISADVANTAGES:
1) Lower efficiency.
2) Lack of flexiblity.
TRANSLAT
ORS
ASSEMBLER
A computer can directly execute only machine
language programme that use members for
representing instructions and storage
locations.Hence an assembly language
progrrame must be converted into its
equivalent machine language programme
before it can be executed on the computer.This
translator programme called ASSEMBLER.
Assembly language(input)-
>Assembler->Machine language
programme(output).

Source (one to one


correspondance)-> Object.

Assembler is a system software supplied by


computer manufacturers.It also assembles the
machine language programmes in the main
memory of the computer and makes it ready
for execution.

COMPILER
High level language programme must be
converted into its equivalent machine language
programme.Before it can be executed on the
computer.This translation is done with the help
of translator programme called COMPILER.

High level language programme


(input)->Compiler-> Machine
language program(output)

High level language (one to many


correspondance)->Object.

A compiler is so called because it compiles a


set of machine language instruction for every
program instruction of a high level language.A
compiler can translate those source program
that have been written in the language for
which the compiler is meant.

for ex: A FORTAN compiler can only translate


source programme written in FORTAN.
INTERPRETER
It is the another type of translator used to
translate high kevel language programme into
its equivalent machine language programmeit
takes one statement of the high level language
translate it into machine language instructions
and then executes the resulting machine
language instructions immediately..

High level language programme


(source program)-> Interpreter
(translates and executes statement
by statement)-> result of the
desired program (output)

Intrepreter differs from the compiler that


nearly translates the entire soure program into
an object program and is not nvolved in its
execution.After compilation of a source
program the resulting object program is saved
permanently for future use and is used
everytime the program is to be
executed.Hence,repeated compilation is not
necessary for repeated execution of a
program.However,in the case of interpreter
since no object program is saved for future use
repeated interpretation of a program is
necessary for its repeated execution.

You might also like