Download presentation
Presentation is loading. Please wait.
Published byClifton Waldridge Modified over 9 years ago
1
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) Object Code This is then saved as a.exe file, that is, a program file..exe stand for ‘executable’ A compiler
2
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) Object Code Doesn’t take much memory, Doesn’t need to be translated again Executes fast A compiler
3
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) TranslateExecute Hello Elephant Goodbye 1 An interpreter
4
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) TranslateExecute Hello Elephant Goodbye 2 An interpreter
5
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) TranslateExecute Hello Elephant Goodbye 3 An interpreter
6
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) TranslateExecute Hello Elephant Goodbye 4 An interpreter
7
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) TranslateExecute Hello Elephant Goodbye 5 An interpreter
8
For i=1 to 5 pctDisplay.Print “Hello elephant” pctDisplay.Print “Goodbye” Next i 0100101001010101 1101101001001010 1110101001010101 1000001001001010 0010101001010101 1111001001001010 10111011010010111 010101001010101 11110011100100110 1010100100010001 001011001001010 Source Code (typed in using text processor) TranslateExecute Hello Elephant Goodbye We still have the original Source Code (typed in using text processor) The translated code is lost It continually translated and executed An interpreter
9
CompilerInterpreter Con Pro Creates an object code version – efficient in memory & speed Does not indicate errors Indicates errors well No Object code produced If used to run a prog, slow because the lines have to repeatedly be translated (inefficient)
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.