The Processor
Review these notes. As you work through them, think about and answer the questions at the bottom of each page.
Program Translation
Answer:
To the source program, where the change is easy to make with a text editor. The changed source program is then translated into a new executable program.
Program Translation
The picture shows what happens with programs written in C (Java is different; it will be discussed in the next chapter.) Here is an overview:
- The source program is created using a text editor.
- It contains instructions in a high level language.
- It contains bytes that represent characters.
- The source program is kept on the hard disk.
- The source program can not be run by the processor.
- A translator (compiler) program translates the source program into an executable program.
- The source program remains unchanged; a new executable program is created.
- The executable program contains machine instructions.
- A translator translates from a specific high level language (like C) into machine instructions for a specific processor type (like Pentium).
- The executable program is also kept on hard disk.
- The machine language program is copied from disk into main memory.
- The processor directly executes these machine language instructions.
Question 10:
Can the processor directly execute the machine language that the program has been translated into?