0% found this document useful (0 votes)
2 views

Programming Languages

Language for programming for devices
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Programming Languages

Language for programming for devices
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Programming

Languages
Programs
• Programs are written in programming languages

• Pieces of the same program can be written in


different programming language

• A programming language is a set of rules and symbols


used to construct a computer program
• A programming language is used to interact with the computer
Computer Languages
– Machine Language
• Uses binary code
• Machine-dependent
• Not portable
• Assembly Language
• Uses mnemonics
• Machine-dependent
• Not usually portable
• High-Level Language (HLL)
• Uses English-like language
• Machine independent
• Portable (but must be compiled for different platforms)
• Examples: Pascal, C, C++, Java, Fortran, . . .
Machine Language
• The representation of a computer program which is actually
read and understood by the computer.
• A program in machine code consists of a sequence of machine
instructions (0s and 1s)
• Instructions:
• Machine instructions are in binary code
• Instructions specify operations and memory cells involved in the
operation
Operation Address
Example:
0010 0000 0000 0100

0100 0000 0000 0101

0011 0000 0000 0110


Assembly Language
• A step towards easier programming.

• Comprised of a set of commands


• tied to a specific processor.

• Assembly language code needs to be translated to


machine language before the computer processes it.

• Is converted to machine code by an assembler.

• Mnemonic representation of the instructions and data


• Example:
Load Price
Add Tax
Store Cost
High-level language
• A programming language which use
statements consisting of English-like keywords
such as "FOR", "PRINT" or “IF“, ... etc.

• Much easier to program than in assembly


language.

• Operations can be described using familiar


symbols

• Example:

Cost := Price + Tax

You might also like