Computing Data Representation Compilers and interpreters United Nations analogy Activity: Discuss very briefly the image and the workings of the UN assembly. Cut out and distribute the 12 roles in the UN assembly from page 3. Students then arrange themselves into groups of three; country A, country B, country C and general. Students then read out their roles to the class in order 1-12. Discuss the following points: 1. Which politician (A, B or C) will have the best understanding during the speech and why? 2. What benefits and problems would the politician have from listening to the speech at the time? 3. Which translation will be of the better quality: the immediate translation through the headphones or the written translated transcript completed after the speech? 4. What benefits and problems would the politician have from reading the translated script after the speech? 1 Computing Data Representation Link to computing: Compliers In a compiler the code for the whole program is converted only once, which can be a slow process, but once it is compiled the executable file is then stored on the hard disk. You will have seen these on your computer as files ending in .exe, such as WinWord.exe for Microsoft Word and Excel.exe for Microsoft Excel. It is much faster to run a compiled program as it is in the language the computer understands. The code of executable file cannot be altered once it has been created. Interpreters When an interpreter runs, it reads each line of code in the program and converts it line by line. This happens every time the program is run. Consequently it is very slow as it is converting the program code while the program is running. It can be as much as 5-10 times slower than running the executable file; because every line of code has to be re-read, then re-processed each time the program is run. Thinking: Relate the above two forms of translation in the UN analogy to compilers and interpreters. (a) the immediate translation through the headphones and (b) the written translated transcript completed after the speech. 1. Which represents the compiler and why? 2. Which represents the interpreter and why? 2 Computing Data Representation 1 Scientist giving the speech I am a scientist, a leader in my field. I am giving a speech today to the United Nations Assembly. My native tongue is English. I am giving the speech in English and it will be quite technical. 2 Stenographer recording the speech I am a stenographer. My job is to record the speech as it is given. My native tongue is English. Nowadays we type rather than write speeches as they occur. I trained for this job for years. 3 Politician from European Country A I’m a representative from European Country A. My English is reasonable although I may have problems with some of the science. I have a scientist with me to explain. 4 Scientist from European Country A I’m a representative from European Country A. I am a scientist in this field too. My English is fair although I may have problems with a few words in the speech. 5 Translator from European Country A I’m a translator. I will translate the speech into the native language of the representative from European Country A. They can easily put on the headphones provided and ask me to clarify any points they struggle with. 6 Politician from Asian Country B I’m a representative from Asian Country B. My English is poor and I will need to listen to the translator in my headphones throughout the speech. I also have a scientist with me to explain the more technical aspects. 7 Scientist from Asian Country B I’m a scientist from Asian Country B. I can just about greet someone in English and usually have a translator with me at all social events. I cannot read English at all. I will be attending this session but will use the headphones the whole time. 8 Translator from Asian Country B I’m a translator. I will translate the speech into the native language of the representative from Asian Country B. I will translate as the speech occurs. 9 Politician from Asian Country C I’m a politician from Asian Country C. I can just about greet someone in English and usually have a translator with me at all social events. I cannot read English at all. I was planning on attending this speech but I will be on a telephone conference at the time and will miss it. I will have to get a copy of the speech later. 11 Translator from Asian Country C I’m a translator. I can translate English to the language of the Asian country C. I will get the typed speech from the stenographer and then translate it to my native language. The written translation will be available in about an hour after the speech finishes. 10 Scientist from Asian Country C I am a scientist from Asian Country C. My English is about as good as the politician’s. I too am needed on the telephone conference and will miss the speech. I will have to read the transcript afterwards. 12 General translator/stenographers We are also translators and stenographers, will ensure the speech is translated into a written format for all the languages of all member states and sent to the correct place so they can be accessed. 3 Computing Data Representation Copyright This educational resource is available for free download for personal and educational use. It is distributed under a Creative Commons Attribution – Noncommercial – NoDerivs licence, for more details please visit the Creative Commons website. Essentially it means that you are free to copy, distribute, and display these educational resources provided you make no changes to the content (including the attribution to the authors and these license terms); you may not use these educational resources for commercial purposes, and you may not alter, transform, or build upon this. We encourage the use of these materials in educational setting, and you are welcome to print your own copy of the book and distribute worksheets from it to students. Any of the above conditions maybe waived if you get written permission from the copyright holder. We welcome enquiries and suggestions, which should be directed to the author on dsh@lgs.slough.sch.uk 4