Translator| Why do we need a translator?
Translator (computer program) that is used to translates one language to lower-level language , as computer can not understand high-level language so, required to translate into lower-level language.
computer understand low level language.
translator provide a interface to computer to read high level language.
Types of translator
There are two types of translator are
Translate from high-level language to lower-level language
Low level example : Assembly language, object code or machine code
High level language example: C, C++, JAVA,Python
Compiler Translate based on language specific demand
if your language want to convert into Assembly language(byte code) then it will convert accordingly.
if your language want to convert into. object code or machine code then it will convert accordingly.
You notice here that compiler either can convert into machine code directly or can convert into Assembly language(byte code) means it depends your language specific compiler.
each language has own compiler example .
Language Compiler C C++ JAVA javac