0% found this document useful (0 votes)
6 views152 pages

Understanding Programming Languages

Uploaded by

gedelapradeep52
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)
6 views152 pages

Understanding Programming Languages

Uploaded by

gedelapradeep52
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

Date

Page

yu
Programming languageg: Programming languages
ане

44 Amtigica? Language
Designed to communicate unstruections to
machine a

37 used to create brograms trat cantral tRe behavior


of a machine t

25 Yubes ot Programming languages

Rxagramming langungeʻs

High Level Low level


Language'd language's

Procedu- lobject or Assemb Mac-


-rat fanF Liented -Ly lan- - hine
-guage Wanguagel guage blanguage
३५
i Machine language=
Directly run an CPU 101,10/001
Sexies of bits like, o and 1
Tedious and erior prone to write co
de monually
ivi not bayiable, not human understandable,

inesembly language
iy leas ewiay pyone
Date
Pagc

24 Coding easier tRan machine language.


a7 Reblace y and os wilt English instructions.
44 Mnemonic codes Joy coriesponding machine
language MOV, AA
AMP L2OCMA
49 Difference betuicen proceduraf and abjectarik
-ented Language=

Procedurap Language object oriented Language


1. Роднат is written a Program is an interacion
of functions between abjects

25 PHoceduyar programming object ariented language's


follows top down approach. follaws bottom up apbroach.

३५ 9t does not have prореr at helps in wrapping data


way for hiding data and Junctians in a class.
49 9n procedurat language 9t helps in buitding secu
data is not seсиrе
re
- programs

531/ In brocedurat Panguодо In object oriented language


code is Interdependent code is madutar

6 In pracedurat fanguage 9t can be extended


Reuse is difficuft Jor reuse-

Nmemonies: means Instruction's given and


convertedunto binary yarm called mnemanias
Oute
Page

Procedwiat language: In fprocedural Language


Pноднат из written as seq-
Fuence of gnebuctions
Example:
Start ()
9 wake ub
9 brush my teett
9 aben fridge
9 take mifk
9 warm it in microwave

Obiect Oriented Language: In abject ariented Lan-


-guage Program us an
interaction of Junctiong between abjects

Start(

LObject ME abjecttridgs
Wakeup()
oben()
brush()
closec)
Jobject Wave
Warm()
Bake

Diffevence behueen High level Languoge


Level Language and Low
Date
Page

High Level Language low level language


49/9t ia programmer frie- 9t io a machine-triendly
-ndly language Language

29 High level language is Law Levee Panguagere


lesa memary efficient high memory efficient

3419t is casy to underatand at is tough to understad.

4191 aa simple to debig at is complex to debug Com


-patatively
네 at is simple to maintain 9t is complex to maintain
comparatively
64 9t is portable 9t is non-portable

74/3t Can run on any 9t is machine deben-


platform -dent

84 High Lovel language's Low level Languages ане


are casy to Learn and challenging to. Learn and
Understand. Understand

991 They executeda10- They


are execute with high
I-wen than low level Speed
languoges because trey
require a translator fro
-gram
9 19 written in ergllab, ar writlen in the fom
af binary numbers
Like Language
generaton lanpuag
Date.
Page

toy they allaw much mare They allow little or no


abstraction abstroction

They do not provide ma ethey are very close to


-ny Yacieities ot the har- hardware and help to
dware Level. write a program at the
fhardware Level-

185 9n HIL yon writing prоg- In 11 for writing bragrame


-rams, hardware Knawledt hardware knowledge ua
-ge is mot required. must

19 the prоднатs аrе casy Modifying prнодната 13


to modijy difficupt

144/A Single Statement may Ghe Statements can be dired


execute Severat Instru0-
1-Ly mapped to precessor
tiong- gnstrructions-
प्रा
Example's: PerL, Pascaf, Example's- machine langua-
Cosol Ruby eetc -ge and Asgembly language
at is less time Consurming It i& time Comuming

84 Campitey 9t is tranglaton wfich takes Input


a

fe., high level language and produces an


autput of low level language ie machine or assemь
1-Ly language-
[Link] as more Intelligent than an assembler
Hit checks all kinds of inita Hanges,
errone ele
But gta brogram kun ima ia mere and occupies a
Targen pant of mamory- at ins glow speed ben-
W
Date
Page

-ause a campiter gaes thriough the entirje program


and then branslates the entirе адаm into
machine cades.

Gouice object
Program CampiPey program

२५ anterpretex: An Interbreter ie a pragram that


translates a frogramming language
Linto a comprehensible language
9t translates anly ane statement of the brogram
at a lime
Anterpreters, mare aften than not are smaller than
Compilers

Source antermediate antepreter


Program Cade

93 Difference between Combiler and anterfrеter:


Combiten Interbreteн
14 Compiter Seang the whiote manglales priogram
program in ane [Link].91 ane statement af a ti
me
py scans the code in one
goConsidering &t scans
the errors are shown at Code
one line at
time,
the end together Crrors are shown l
ine
by line.D.
25 Main advantage of comprtet Due to Int
erpreterg
is il's execution time being glow in executing
the objecl Code- 9t
roFo lesa
Date

Page

47 9t converts the source 9t Grequirea) does not


code into object code. convert sowice code into
lobject code instead 9+
seang ut Line by Line

5-J 9t daes not require sout 9t rедuires sou


rce
-rce code for Later code for Later execution
Executiom

Eg= c,c++, t# etc Eg:= Pytfron, Ruby, PerL,


dava
SNOBOL, Matlab etc.

lo Werking of Campiter and Interр


нетел
14 Combiter

Source Preproce- Jobject


Code Pruaceaaing
-geing Cade Machioe
Anterbreter

Source
Cade IntermedialeBroceasing
Code
Interpreter

Assembler is uged to
translate the brogra
written in Assembl m
Code- The Saurce y language into machineti
p rogram
is an uhput of an
embler dRat cont ass-
aths assembly lan
the outbut generated by the g uage Instouction
assembler ia the
abject code ar machine code-undergtandabtoby

You might also like