Computer Languages

Types of Computer Languages

  • Low Level Languages: These include machine language and assembly language. Machine language is written in binary and is the only language directly understood by a computer. Assembly languages use short codes (mnemonics) to represent the binary data, making it slightly easier for humans to understand and write.

  • High Level Languages: These are more human-readable languages, such as Python, Java, C++, and JavaScript. High level languages are much easier to learn and use, but they need a compiler or interpreter to translate them into machine readable code.

Features of High Level Languages

  • Readability: High level languages are syntax-heavy, which means their code often looks similar to human language. This makes them easier to read and understand.

  • Portability: High level languages can be used on many different types of computers and devices. They are not specific to one type of processor or machine.

  • Advanced Features: High level languages can include built-in support for complex tasks like web development, user interface design, and data handling.

Examples of High Level Languages

  • Python: Known for its simplicity and readability, Python is widely used in a variety of programming areas, from web development to machine learning.

  • Java: This is a highly popular language due to its ‘write once, run anywhere’ philosophy. Java code is designed to run on any device that has the Java Runtime Environment (JRE) installed.

  • C++: A more complex language, C++ is used for system/application software, drivers, client-server applications and embedded firmware. It is known for its efficiency and control.

Compilation and Interpretation

  • Compilers: These are programs that translate high level language into machine code. Compilation occurs before execution and generates an executable file.

  • Interpreters: These also translate high level language into machine code, but they do it line-by-line during program execution. This allows for interactive programming, but can be slower.

Functions of Compilers

  • Lexical Analysis: Breaking down the program into its most basic parts (individual words and phrases).

  • Syntax Analysis: Checking the structure of the program to ensure it follows the rules of the language.

  • Code Generation & Optimisation: Outputting the program as machine code, whilst making it as efficient as possible.

Understanding these topics should provide a solid foundation for your understanding of computer languages. Remember to explore each language individually, studying its unique syntax and use cases. Practice writing basic programs in different languages to build your skills and confidence.