high level languages need to be translated. what are two different types of translator?

Thank you for using the Jiskha Homework Help Forum. By your question do you mean human vs. mechanical (machine or computer-assisted) translation?

Yes, you are on the right track! When it comes to translating high-level languages, there are two different types of translators: compilers and interpreters.

1. Compilers: A compiler is a type of translator that converts the entire source code written in a high-level programming language into machine code or low-level code. The process is done in a single translation phase before the program is executed. The compiler analyzes the entire source code, performs various optimizations, and generates an executable file that can be run independently on the target machine. Some popular examples of compilers are GCC (GNU Compiler Collection) for languages like C, C++, and Java's javac compiler.

To use a compiler for translation, you typically perform the following steps:
- Write the source code in a high-level language.
- Run the compiler, which translates the entire source code into machine code.
- The resulting machine code can then be executed directly on the target machine.

2. Interpreters: An interpreter is another type of translator that translates and executes the source code line by line or statement by statement. Instead of generating an independent executable file like a compiler, an interpreter directly executes the source code without the need for an intermediate stage of compilation. It reads each line of the source code, converts it into machine code or a lower-level representation, and executes it immediately. Python and JavaScript are examples of programming languages that are often executed by interpreters.

To use an interpreter for translation, you typically perform the following steps:
- Write the source code in a high-level language.
- Run the interpreter, which reads each line of the source code, translates it, and executes it immediately.

In summary, compilers and interpreters are two different types of translators used for high-level languages. Compilers perform a one-time translation of the entire source code, generating an executable file, while interpreters translate and execute the code line by line or statement by statement without generating an independent executable.