Chapter 7 - Programming Flashcards Preview

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

Flashcards in Chapter 7 - Programming Deck (31)
Loading flashcards...
1

In a flow chart what does a slanted square mean?

Input or output

2

In a flow chart what does a square mean?

Process, doing something

3

What is machine code?

Instructions represented in binary used by the CPU

4

What does machine code consist of?

An opcode: tells the processor what to do
An operand: tells the processor what to do it to

5

What are binary bit patterns decoded by?

The processor's logic circuits

6

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.

7

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

8

What is an assembler?

Software which translates mnemonic instructions in assembly language to machine code

9

What is a compiler?

Converts the whole high level code into machine code before running it

10

What is an interpreter?

Converts the code one instruction at a time, running each instruction before translating the next

11

What is source code?

Code written by the programmer
A compiler turns source code into object code which runs independently to the source code

12

Advantages + disadvantages of an assembler?

Precise and direct instructions to the computer hardware
Difficult to code and limited range of commands available

13

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

14

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

15

What is an IDE?

Translators usually include an integrated development environment o help programmers

16

What are typical features of an IDE?

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

17

What is a source code editor?

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

18

What is an error diagnostics and debugger,

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

19

What is a run time environment?

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

20

What is a translator?

Compiled or interprets the source code into runnable machine code

21

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

22

What is a constant/variable?

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

23

What does an integer store?

Whole number values, positive or negative with no decimal part

24

What does a real store?

Numbers with a decimal part or factional part

25

What does a character store?

Single alphanumeric character

26

What does a string store?

Any string of alphanumeric characters

27

What does Boolean store?

Either True or False

28

What does mean?

Is not equal to

29

How do you select a specific variable in an array?

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

30

What is a syntax error?

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