-A compiler is a program that takes source code as its input, check the entire program instruction by instruction for its grammatical accuracy, and if the source code is grammatical accurate, then it translates the program again instruction by instruction to machine language and writes to the disk file.