what are the three main programming constructs used in procedural programming?
sequence, selection, iteration
how does assembly language differ from machine code?
assembly language uses mnemonics rather than binary, one line in assembly language is equal to one line in machine code
function of the STA mnemonic?
storing the value in the accumulator at the given memory address
function of the BRP mnemonic?
branches to a given address if the value in the accumulator is positive, it is a conditional branch.
describe how selection works
a certain block of code is run if a specific condition is met, using IF, ELSE IF and ELSE statements
how do variables and constants differ?
the value of a constant cannot be edited by the program during execution while the contents of a variable can be changed
when might constants be used?
for values that do not need to be changed or to prevent a value from being accidentally changed
define what is meant by a function
a named block of code that performs a specific task and must always return a single value
role of the MOD function?
MOD (or %) is used to find the remainder when a number is divided by another
what are relational operators used for?
relational operators are used to make comparisons between two values and produce a result of either true or false
what is the function of the == operator?
== is used to check whether a value is identical to another
three Boolean operators
AND, OR and NOT
what programming structure is used when a certain section of code needs to be executed while a certain condition remains true?
iteration - specifically a WHILE loop