Higher – Languages and Environments (Revision)

·         Low-level: language that a computer will understand; consists of 0s, 1s; examples include assembly code and machine code

·         High-level: language that a human will understand; use of English words such as repeat, if, loop, put

·         Procedural: code will processed logically and in a set order; passes data from one procedure to another using parameters

·         Declarative: consists of a knowledge base of facts and rules that can be queried

·         Object-Oriented: objects are created using classes that will contain code and data (encapsulation); data associated is known as attributes and its values are known as states; sub-classes can inherit attributes from a pre-defined class

·         Interpreter: takes each line of source code, translates it into machine code then passes it to processor to carry out that instruction; it works its way through the program one line at a time

Advantages Disadvantages
A program will run even if it is not finished No copy of machine code is saved meaning the source code has to be translated every time taking longer
Easy to spot errors during the translation The process of translating the program slows down the running of it
Program will run as soon as the first line is translated You will need to have a translator program or you cannot run it

·         Compiler: reads the source code and translates the entire program into machine code once; machine code then saved and kept and doesn’t need to be further translated before run

Advantages Disadvantages
The machine code is saved so the program only needs to be translated once You have to wait until the code is complete and the errors have been fixed before the translation can be finished and the machine code is run
The user does not need a translator program to run the machine code therefore the program runs quicker Each time the program is changed it needs to be re-translated

Thank you to C O’Toole & A Madill from Braidhurst High School for allowing me to publish this here.

Leave a Reply

Your email address will not be published. Required fields are marked *