Chapter 7 - Programming Flashcards
In a flow chart what does a slanted square mean?
Input or output
In a flow chart what does a square mean?
Process, doing something
What is machine code?
Instructions represented in binary used by the CPU
What does machine code consist of?
An opcode: tells the processor what to do
An operand: tells the processor what to do it to
What are binary bit patterns decoded by?
The processor’s logic circuits
What is high-level languages?
A programming languages which resembles a natural language, each instruction translates to many machine instructions. It is problem based rather than machine based.
Why is there a new for translators?
CPU does not understand high level code, therefore it must be translated into a set of machine code instructions
What is an assembler?
Software which translates mnemonic instructions in assembly language to machine code
What is a compiler?
Converts the whole high level code into machine code before running it
What is an interpreter?
Converts the code one instruction at a time, running each instruction before translating the next
What is source code?
Code written by the programmer
A compiler turns source code into object code which runs independently to the source code
Advantages + disadvantages of an assembler?
Precise and direct instructions to the computer hardware
Difficult to code and limited range of commands available
Advantages + disadvantages of a compiler?
Code runs quickly once compiled
Difficult for others to modify without access to source code
Initial compilation can be slow
Errors are generated for all the code at once - difficult to debug
Advantages + disadvantages of an interpreter?
Executes one statement at a time so easy to debug
Code can be developed and tested in stages
More portable as the code will run anywhere as long as there is an interpreter available
Interpreter takes up space in memory
Code executes slowly
Interpreter needed on target machine
What is an IDE?
Translators usually include an integrated development environment o help programmers