 In a typical application, a compiler or assembler converts a program's source code (such as in C or assembly language) to machine code and outputs it into a HEX file.Common file extensions used for the resulting files are .HEX or .H86.The HEX file is then read by a programmer to write the machine code into a PROM or is transferred to the target system for loading and execution.