source code (programcompiler machine code running inputs program outputs figure compiling high-level language all of the languages mentioned above are examples of high-level computer languages although they are precisethey are designed to be used and understood by humans strictly speakingcomputer hardware can only understand very low-level language known as machine language suppose we want the computer to add two numbers the instructions that the cpu actually carries out might be something like this load the number from memory location into the cpu load the number from memory location into the cpu add the two numbers in the cpu store the result into location this seems like lot of work to add two numbersdoesn' itactuallyit' even more complicated than this because the instructions and numbers are represented in binary notation (as sequences of and sin high-level language like pythonthe addition of two numbers can be expressed more naturallyc that' lot easier for us to understandbut we need some way to translate the high-level language into the machine language that the computer can execute there are two ways to do thisa high-level language can either be compiled or interpreted compiler is complex computer program that takes another program written in high-level language and translates it into an equivalent program in the machine language of some computer figure shows block diagram of the compiling process the high-level program is called source codeand the resulting machine code is program that the computer can directly execute the dashed line in the diagram represents the execution of the machine code (aka "running the program"an interpreter is program that simulates computer that understands high-level language rather than translating the source program into machine language equivalentthe interpreter analyzes and executes the source code instruction by instruction as necessary figure illustrates the process the difference between interpreting and compiling is that compiling is one-shot translationonce program is compiledit may be run over and over again without further need for the compiler or the source code in the interpreted casethe interpreter and the source are needed every time