Types of Programming Languages, Translators and Integrated Development Environments (IDEs) (Copy)
- Computers can only understand machine code, which is in binary form of 1 and 0.
- A program written in a programming language must be translated to machine code to ensure that the computer can understand it.
- We tell computer through program on what to do, how to do and when to do it.
- Through programs, a computer can perform multiple tasks.
- Computer program
- A list of instructions that enables a computer to perform specific tasks.
- Can be written in high-level languages and low-level languages
- Most programmers use high level languages
High Level Languages and Low-Level Languages
- High Level Languages
- Here, the main focus is on the problem solved.
- No real understanding required of the hardware or instruction set of the computer.
- High-level languages are portable and can be used on different types of computers
- Designed with the programmer in mind.
- Easier statements that can make coding easier
- Language is closer to English
- Shorter time
- Debugging during development
- Can be maintained during use.
- Many different examples such as Delphi, Java, Pascal, Visual Basis, C++, Python and many more.
- If you learn one high level language, it becomes easier to learn other high level languages.
- Problem-oriented
- Low level languages
- Focused on specific architecture and hardware of a particular type of computer
- Can refer to machine code or assembly language
- Machine Code
- It is difficult to understand and storage and manipulation of data can be complicated.
- Usually written in hexadecimal.
- Benefits and Drawbacks
- High Level Languages
- Advantages
- Can be used on multiple computers
- Easier to understand
- Quicker to use
- Easier to debug
- Maintenance during use is easy
- Disadvantages
- Larger programs with more space
- Longer to execute
- May not be able to use special hardware
- Advantages
- Low-Level
- Advantages
- Use special hardware
- Machine-dependent instructions
- Not much space taken in primary memory
- Tasks performed very quickly
- Disadvantages
- Longer to write and debug
- Difficult to understand
- Advantages
- High Level Languages
Assembly Language
- LDA means load value of the variable into the accumulator
- ADD means add value of variable to the value stored in accumulator
- STO means replace the value of the variable by the value stored in the accumulator
- Assembly language needs to be translated into machine code using an assembler to run.
Translators
- Computer can only understand programs when they are translated to binary instructions and machine code.
- Done by translator
- Different translator programs perform different tasks
- Compiler
- Translates the entire program written in HLL into machine code in one go
- The program produced can be directly used by computer to perform the required task
- Once compiled, the same program can be used again and again to perform the same task
- Recompilation not required
- If any errors occur, the error report is produced instead of the compiled program
- Produces executable file
- One high level language statement can be translated into several machine code instructions
- Distributed to general use
- Interpreters
- Reads a statement from the program, translates it, performs the specified action and then goes on to the next statement, repeating the process.
- If an error is present in a statement, the execution stops
- Error message is given, with sometimes a suggested correction
- Need to reinterpret program each time it is used.
- One high-level language program statement may require several machine code instructions to be executed
- Usually used during development of program
- Assembler
- Translates a program from assembly language into machine code.
- Can be used directly by the computer
- Once assembled, re-assembly not required
- Can be used again and again.
- Produces executable file
- One low-level language statement is usually translated into one machine code instruction
- Distributed to general use
- Integrated Development Environment
- IDE
- Used when writing a computer program
- A software that provides an editor to enter and amend the code
- Auto-completion where the command being written is provided a suggested end
- Auto-correction: where the spelling of a command are told the correct one
- Prettyprint changes the colors of the words to different identifiers
- Block minimizing so different sections of the code can be minimized and read easily.
- Relevant translators included as well
- Run-time environment
- Output is displayed
- Command line or GUI both can be possible based on the programming language and the programming code.
- Debugging features
- Error diagnosis
- Helps to find the problems
- Break points: Code stops at these points defined by the user.
- Â Can check the output of a code to a certain point.
- Variable watch windows can show the value of the variables of the code to be seen while being types
- Stepping
- Run one line at a time to determine if each line is correct
