2.1.7 Programming Flashcards
What is an algorithm?
A set of instructions to solve a problem
What is a logic error?
When the program works but not as it’s supposed to
What is a syntax error?
When there is an error with the code itself
What is high level code?
They are codes we are able to read and understand. E.g. Java, Python and C
What is machine code?
Binary code that computers understand, as they cant understand high level code
What is opcode?
The instruction that the CPU has to execute
What is operand?
The data that is stored by the CPU
What do translators do?
They convert source code into machine code
What are the three types of translators?
Interpreters and compilers and assemblers
What does an interpreter do?
Takes each line of high level code, converts it and runs it. The CPU executes each instruction before it moves on to the next instruction
What does a compiler do?
Converts all high level code into machine code and executes it in one go. Once the code has been compiled it can run as often as needed at a higher speed.
What does an assembler do?
Translates assembly language into machine code. Its written in mnemonics, which is a low level language that closely represents the operations of the CPU
What does sequence mean?
Code executing line by line, from top to bottom
What does selection mean?
An if statement
What does iteration mean?
Loops