Chapter 7 - Programming Flashcards Preview

SHHS - Computing - GCSE OCR Computer Science > Chapter 7 - Programming > Flashcards

Flashcards in Chapter 7 - Programming Deck (31)
Loading 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


What are typical features of an IDE?

Source code editor
Error diagnostics and debugger
Run time environment
Translator (compiler/interpreter)
Automation tools


What is a source code editor?

A text editing area organises the code including indenting structures and colour coding command words, variables an comments


What is an error diagnostics and debugger,

Warnings identify potential problems with the code and listing errors found in the code


What is a run time environment?

Allows the developer to run the code during development to check for logical errors


What is a translator?

Compiled or interprets the source code into runnable machine code


Why are automation tools?

Auto documentation: tracks variables, sub routines and comments as the project is developed ( produce text file used for maintenance)
Wizards: autocomplete woe as it is typed


What is a constant/variable?

A named storage space reserved in memory to store the value associated with that variable name or constant


What does an integer store?

Whole number values, positive or negative with no decimal part


What does a real store?

Numbers with a decimal part or factional part


What does a character store?

Single alphanumeric character


What does a string store?

Any string of alphanumeric characters


What does Boolean store?

Either True or False


What does mean?

Is not equal to


How do you select a specific variable in an array?

Using an index = array(3)
Starts at 0!!


What is a syntax error?

Errors in the use of language rules and these are often identified by the IDE