In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language).
This implies that the compiler can also convert from a low-level language to a high-level language. But this has also got a specific name decompiler.
So what should be the definition for a compiler? 1) or 2)?
In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language).
A compiler is a computer program that translates computer code written in a high-level programming language into a low-level language.