Skip to main content

[SSC II] Computer Science SLO 8.1.5

 

Computer Science SSC II Notes - AKUEB


8.1.5 Differentiate among assembler, compiler and interpreter;

Compiler:

        A compiler is a software tool that translates the entire source code of a high-level programming language into machine code or an executable program. The compilation process involves several stages, including syntax analysis, semantic analysis, code optimization, and code generation. The compiler produces an output file or executable that can be directly executed by the computer's hardware without the need for further translation. Common examples of compilers include GCC (GNU Compiler Collection) for C/C++, Java Compiler for Java, and the Swift Compiler for Swift.

 

Assembler:

      An assembler is a software tool that translates assembly language code into machine code. Assembly language is a low-level programming language that uses mnemonic codes to represent machine instructions. The assembler processes the assembly language code and generates the corresponding machine code, which consists of binary instructions that can be executed directly by the computer's hardware.

 

Interpreter:

       An interpreter is a software tool that directly executes the source code of a high-level programming language line by line, without prior translation into machine code. The interpreter reads each line of the source code, analyzes its syntax, and performs the corresponding operations or actions in real-time. Interpreters typically execute the code sequentially, executing one line at a time, and provide immediate feedback and output. Examples of interpreted languages include Python, Ruby, and JavaScript.

 

In summary, a compiler translates the entire source code of a high-level language into machine code, an assembler translates assembly language code into machine code, and an interpreter executes high-level language code directly without prior translation. Each of these tools serves a different purpose in the software development process, enabling the execution of programs on different levels of abstraction and facilitating the interaction between code and the computer's hardware.'



Cognitive Level: Understanding
 

Comments

© 2020 NEXUS NOTES

Designed by Open Themes & Nahuatl.mx.