2.5 programming languages and IDEs

Cards (15)

  • Written in assembly languageTranslated by an assembler into machine codeUsed for embedded systems and device drivers where instructing hardware directly is needed.One instruction translated into one machine code instructionCode works on 1 type of processor only Programmer works with memory directly Code is harder to write and understand Memory efficient.Code is fast to execute.
  • Low level languages


    Written in assembly languageTranslated by an assembler into machine codeUsed for embedded systems and device drivers where instructing hardware directly is needed.One instruction translated into one machine code instructionCode works on 1 type of processor only Programmer works with memory directly Code is harder to write and understand Memory efficient.Code is fast to execute.
  • Machine code
    Binary representation of instructions in a format that the cpu can decode and execute.Have operation code(opcode) instruction and address or data to use (operand).
  • High level languages
    Source code is written in languages as Python, C++, Java, Visual Basic.
    Translated by a compiler or interpreter into machine code.
    Makes the writing of computer programs easier by using commands that are like English. One source code instruction translates to many machine code instructions.
    Code will run on different types of processors.
    The programmer has lots of data structures to use.
    Code is quicker and easier to understand and write.
    Less memory efficient.
    Code can be slower to execute if it is not optimised.
  • Compiler
    Translates source code from high-level languages into object code and then into machine code ready to be processed by the CPU.
    The whole program is translated into machine code before it is run.
  • Advantages of compliers
    No need for translation software at run-time.
    Speed of execution is faster.
    Code is usually optimised.
    Original source code is kept secret
  • Disadvantages of compliers
    Source code is easier to write in a high-level language, but the program will not run with syntax errors which can make it more difficult to write the code.
    Code needs to be recompiled when the code is changed.
    Designed for a specific type of processor
  • Interpreter
    Translates source code from high level languages into machine code ready to be processed by the CPU. The program is translated line by line as the program is running
  • Advantages of interpreter
    Easy to write source code because the program will always run, stopping when it finds a syntax error.
    Code does not need to be recompiled when code is changed, and it is easy to try out commands when the program has paused after finding an error.
    This makes interpreted languages very easy for beginner programmers to learn to write code.
  • Disadvantages of interpreters
    Translation software is needed at run-time.
    Speed of execution is slower.
    Code is not optimised.
    Source code is needed.
  • IDE's provide the following functions:
    Debugging tools for finding logic errors:
    Help with preventing and identifying syntax errors:
    Providing a run time environment:
    Usability functions:
  • Debugging tools for finding logic errors
    Breakpoints-stopping a program at a line of code during execution.
    Stepping through lines of code one at a time to check which lines are executing.
    Tracing through a program to output the values of variables.
  • Help with preventing and identifying syntax errors
    Illustrating keyword syntax and auto-completing command entry.
    Error highlighting
    The compiler produces an output of the error message to help identify it
  • Providing a run time environment:

    Output window.
    Simulating different devices the program can run on.
  • Usability functions:

    Navigation, showing/hiding sections of code.
    Formatting source code.
    Find and replace.
    Comment or indent regions.