SlideShare a Scribd company logo
Introduction to
C++
Programming
1. Machine level language
2. Assembly language
3. High-level language
Classification of computer language
Machine level language
 Only language of a computer understand by
it without using a translation program.
 Normally written as strings of binary 1s and
0s
A typical language instruction
format
 OPCODE tells the computer which operation to
perform from the instruction set of the
computer
 OPERAND tells the address of the data on which
the operation s to be performed
Advantage
Can be execute very fast
Limitations
Machine Dependent
Difficult to program
Error prone
Difficult to modify
Assembly/ symbolic Language
Using alphanumeric mnemonic codes instead of numeric
codes for the instruction in the instruction set.
E.g. using ADD instead of 1110(binary) or 14 (decimal) for
instruction to ADD .
Allowing storage locations to be represented in the form of
alphanumeric addresses instead of numeric addresses e.g.
representing memory location 1000,1001 and 1002 as FRST,
SCND and ANSR respectively.
Assembler
 Software that translates as assembly language
program into an equivalent machine language
program of a computer.
ASSEMBLER
INPUT
Assembly
Language
program
OUTPUT Machine
Language
program
 Easier to understand and use.
 Easier to locate and correct errors.
 Easy to modify.
 No worry about addresses.
Advantages of Assembly language over Machine language
Disadvantages of Assembly language
• Machine dependent
• Knowledge of hardware required
Machine independent.
Do not require programmers to know
anything about the internal structure of
computer on which high-level Language programs will be
executed
High-level language
•. Deal with high-level coding, enabling the programmers to
write instruction using English words and familiar
mathematical symbols and expressions.
Compiler
 Translator program (software) that translates a high level
language program into its equivalent machine language
program.
 Compiles a set of machine language instructions for every
program instruction in a high level language.
Interpreter
 Interpreter is a high level translator
 Takes one statement of a high level language program,
translates it into machine language instructions.
 Immediately executes the resulting machine language
instructions
 Compiler simply translates the entire source program into
an object program and is involved in its execution.
INTERPRETER
INPUT OUTPUT
High level
Language
program
Machine
Language
program
Advantages
 Machine independent.
 Easier to learn and use.
 Fever errors during program development.
 Better documentation.
 Easier to maintain.
Limitations
•Less flexibility to control the computer’s
CPU, memory and registers
Source Code :
$ Source code refers to high level code or assembly code which is
generated by human/programmer.
$ Source code is easy to read and modify.
$ It is written by programmer by using any High-Level Language or
Intermediate language which is human-readable.
$ Source code contains comments that programmer puts for better understanding.
Source code is provided to language translator which converts it into machine understandable code which is called machine code or object code.
Computer can not understand direct source code, computer understands machine code and executes it.
It is considered as fundamental component of computer.
Source code is a set of instructions/commands and statements which is written by a programmer by using a computer programming language like C, C++, Java, Python, Assembly language etc.
So, statements written in any programming language is termed as source code
Object code refers to low level code which is
understandable by machine. Object code is generated from
source code after going through compiler or other translators. It is
in executable machine code format.
Object code contains a sequence of machine understandable
instructions to which Central Processing Unit understands and
executes.
Object file contains object code. Some object file examples are
common object file format (COFF), COM files and “.exe” files. It is
the output of a compiler or other translator. We can
understand source code but we can not understand object code
Object Code :
The source code and object code
C++Introduction for numerical methods in M.Sc
C++Introduction for numerical methods in M.Sc
C++Introduction for numerical methods in M.Sc
C++Introduction for numerical methods in M.Sc

More Related Content

PPT
introduction computer programming languages
PPTX
classification of computer language
PPT
Session01 basics programming
PPTX
Life cycle of a computer program
PPTX
computer programming and hardware technique
PPTX
Computer language
PPT
Lahor main It revoloution anfd its uses.
PPT
basics of it in pakistan and all over the
introduction computer programming languages
classification of computer language
Session01 basics programming
Life cycle of a computer program
computer programming and hardware technique
Computer language
Lahor main It revoloution anfd its uses.
basics of it in pakistan and all over the

Similar to C++Introduction for numerical methods in M.Sc (20)

PPT
Introduction Computer programming and operating system
PPT
introduction to computer programming and its examples
PPT
presentation of Programing fundamental.
PDF
Languages in computer
PPTX
C++ programming languages lectures
PPT
Introduction to C for Btech 1st year.ppt
PPT
Computer languages
PPTX
Presentation - 05 High level and low level languages.pptx
PPTX
Computer Topic (Introduction to Programming).pptx
PDF
Programming Languages
PPTX
Computer languages
PPTX
Programming language
PPTX
Compiler design slide share
PPTX
Programming fundamentals presentation
PPTX
Language processors
PDF
Introduction to computer programming
PPTX
Introduction_to_Programming.pptx
PPTX
Define Computer language, Translator, Standard input out C
PPTX
Compilers.pptx
PPTX
Data programming with the minimum hocker
Introduction Computer programming and operating system
introduction to computer programming and its examples
presentation of Programing fundamental.
Languages in computer
C++ programming languages lectures
Introduction to C for Btech 1st year.ppt
Computer languages
Presentation - 05 High level and low level languages.pptx
Computer Topic (Introduction to Programming).pptx
Programming Languages
Computer languages
Programming language
Compiler design slide share
Programming fundamentals presentation
Language processors
Introduction to computer programming
Introduction_to_Programming.pptx
Define Computer language, Translator, Standard input out C
Compilers.pptx
Data programming with the minimum hocker
Ad

Recently uploaded (20)

PPTX
2. Earth - The Living Planet Module 2ELS
PPTX
famous lake in india and its disturibution and importance
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PDF
Sciences of Europe No 170 (2025)
PPTX
Microbiology with diagram medical studies .pptx
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PPTX
BIOMOLECULES PPT........................
PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PDF
. Radiology Case Scenariosssssssssssssss
DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PPTX
Cell Membrane: Structure, Composition & Functions
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PPTX
neck nodes and dissection types and lymph nodes levels
PPTX
2. Earth - The Living Planet earth and life
2. Earth - The Living Planet Module 2ELS
famous lake in india and its disturibution and importance
Comparative Structure of Integument in Vertebrates.pptx
TOTAL hIP ARTHROPLASTY Presentation.pptx
Sciences of Europe No 170 (2025)
Microbiology with diagram medical studies .pptx
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
The KM-GBF monitoring framework – status & key messages.pptx
BIOMOLECULES PPT........................
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
. Radiology Case Scenariosssssssssssssss
Viruses (History, structure and composition, classification, Bacteriophage Re...
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
Cell Membrane: Structure, Composition & Functions
bbec55_b34400a7914c42429908233dbd381773.pdf
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
neck nodes and dissection types and lymph nodes levels
2. Earth - The Living Planet earth and life
Ad

C++Introduction for numerical methods in M.Sc

  • 2. 1. Machine level language 2. Assembly language 3. High-level language Classification of computer language
  • 3. Machine level language  Only language of a computer understand by it without using a translation program.  Normally written as strings of binary 1s and 0s
  • 4. A typical language instruction format  OPCODE tells the computer which operation to perform from the instruction set of the computer  OPERAND tells the address of the data on which the operation s to be performed
  • 5. Advantage Can be execute very fast Limitations Machine Dependent Difficult to program Error prone Difficult to modify
  • 6. Assembly/ symbolic Language Using alphanumeric mnemonic codes instead of numeric codes for the instruction in the instruction set. E.g. using ADD instead of 1110(binary) or 14 (decimal) for instruction to ADD . Allowing storage locations to be represented in the form of alphanumeric addresses instead of numeric addresses e.g. representing memory location 1000,1001 and 1002 as FRST, SCND and ANSR respectively.
  • 7. Assembler  Software that translates as assembly language program into an equivalent machine language program of a computer. ASSEMBLER INPUT Assembly Language program OUTPUT Machine Language program
  • 8.  Easier to understand and use.  Easier to locate and correct errors.  Easy to modify.  No worry about addresses. Advantages of Assembly language over Machine language Disadvantages of Assembly language • Machine dependent • Knowledge of hardware required
  • 9. Machine independent. Do not require programmers to know anything about the internal structure of computer on which high-level Language programs will be executed High-level language •. Deal with high-level coding, enabling the programmers to write instruction using English words and familiar mathematical symbols and expressions.
  • 10. Compiler  Translator program (software) that translates a high level language program into its equivalent machine language program.  Compiles a set of machine language instructions for every program instruction in a high level language.
  • 11. Interpreter  Interpreter is a high level translator  Takes one statement of a high level language program, translates it into machine language instructions.  Immediately executes the resulting machine language instructions  Compiler simply translates the entire source program into an object program and is involved in its execution. INTERPRETER INPUT OUTPUT High level Language program Machine Language program
  • 12. Advantages  Machine independent.  Easier to learn and use.  Fever errors during program development.  Better documentation.  Easier to maintain. Limitations •Less flexibility to control the computer’s CPU, memory and registers
  • 13. Source Code : $ Source code refers to high level code or assembly code which is generated by human/programmer. $ Source code is easy to read and modify. $ It is written by programmer by using any High-Level Language or Intermediate language which is human-readable. $ Source code contains comments that programmer puts for better understanding. Source code is provided to language translator which converts it into machine understandable code which is called machine code or object code. Computer can not understand direct source code, computer understands machine code and executes it. It is considered as fundamental component of computer. Source code is a set of instructions/commands and statements which is written by a programmer by using a computer programming language like C, C++, Java, Python, Assembly language etc. So, statements written in any programming language is termed as source code
  • 14. Object code refers to low level code which is understandable by machine. Object code is generated from source code after going through compiler or other translators. It is in executable machine code format. Object code contains a sequence of machine understandable instructions to which Central Processing Unit understands and executes. Object file contains object code. Some object file examples are common object file format (COFF), COM files and “.exe” files. It is the output of a compiler or other translator. We can understand source code but we can not understand object code Object Code :
  • 15. The source code and object code