Assembly Language
Assembly Language
• This is used rather than binary code which allowed continuation of working
directly with the hardware but removed an element of complexity
• A mnemonic is received by the computer and it is looked up within a specific
table
• An assembler is needed here to check the word so that it can be converted
into machine code
• If a match from the word is found e.g. STO the word is replaced with the
relevant binary code to match that sequence
Translators
Compilers & Interpreters
• Programmers will write program source code using high-level languages e.g.
Python, Java, C# etc. As programmers, we can understand source code as it
is descriptive, easy to read, maintain and debug. However this is not good for
the hardware as it needs to be converted into binary to allow the hardware to
understand and execute it, this is known as machine code. For this to work it
needs to pass through a translator first. There are two types of translators - a
compiler and an interpreter
Compiler
• This method will translate a program into machine code. Compilers convert
the source code in one go into an executable file ready for distribution. This
method is used mainly when a program is finished with no syntax or logical
errors
• Compiling may take time to be processed, however, this can be used over
without needing to be recompiled every time, bearing in mind that the program
contains no errors
• Error reports are produced after a program has been translated. Common
errors in code will allow the computer to crash and not respond, it’s important
to be aware that if there are errors the source code must be changed to
compile again
Interpreter
• This is the method that directly sends the source code to the machine code.
This will translate each line of code individually, if an error occurs the program
will stop and an error message will occur. Once the error message is fixed,
the program can carry on running from where the error occurred
ough both translators find errors in code, they do not debug the errors - this is done
by the programmer
Advantages Disadvantages
Run quickly as the program as the Due to all code being compiled at the same time there must be
source code has been stored to be enough memory space to handle this, if not and virtual
translated memory is used it can be much slower
Interpreter
Advantages Disadvantages
IDE
Download PDF
IDE
An integrated development environment (IDE) is software that consolidates basic
tools required to write and test software to make a programmer's journey effective
and useful, this will ensure they have key features to improve programming code and
ensure it does as instructed. Some features are:
• Basic code formatting - changing the font, size of the font, making text bold
etc
• Coloured keywords in source code - e.g. Python code print, input etc turn
purple, if turns orange. This makes it easy to see keywords
• Code Editing - this will allow users to write and manipulate source code, it
includes features such as auto-completion and auto-correction of code,
bracket matching, syntax checks etc
• Commenting code - this allows sections of code to be commented out easily
to stop it from being run or as comments on what the program is doing
• Identifying errors - highlight particular areas of code or provide direct error
messages where the error may have appeared e.g. indentation errors etc
• Run-Time environment - to allow the program to run and see its
corresponding output
• Debugger - this will identify and remedy errors within the source code. This
can provide a step through command also which provides step by step
instructions and shows what is happening to the code line by line. This
method is amazing for catching logical errors
• Libraries - extra modules that are not included in the main programming
language e.g. math in Python for extra mathematical commands
• Graphical User Interface Builder - will create a graphical design rather than
working with source code
• Translator - which compiles or interprets the code
Exam Tip