(4) A compiler is a computer program that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code. It translates a source program written in some high-level programming language (such as Java) into machine code.