Section 1 Flashcards

1
Q

Standard algorithms

A
  • Input validation
  • Running total in loop
  • Traversing a 1D array
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Predefined Functions

A
  • Round:
    Rounds numbers to certain no. of sig figs
    eg SET size TO ROUND (measurement, 2)
  • Length:
    Returns the number of characters present in a value held in a variable
    eg SET numberOfCharacters TO LENGTH (firstname)
  • Random:
    Returns random value in given parameters
    eg SET bonusBall TO RANDOM(1, 59)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Storing real numbers

A

Stored using mantissa and exponent
mantissa x base ^ exponent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Types of errors

A
  • Syntax [eg misspelling]
  • Logic [eg code out of order]
  • Execution/run time [eg dividing by 0]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Factors affecting readability

A
  • Whitespace
  • Meaningful variable names
  • Internal commentary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Logical operators

A
  • AND
  • OR
  • NOT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Storing vector graphics

A

Stored as a series of objects with a list of attributes
objects: square, ellipse
attributes: x- and y- coordinates, fill colour, length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Storing bitmapped graphics

A

Stored as a grid of pixels, each with it’s own unique binary code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Types of loops

A

conditional: keeps repeating until a condition is met.
eg while loops

unconditional/fixed: repeats a set number of times.
eg for loops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Number of bits for an ASCII string

A

Each character is 1 byte (8 bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Compiler

A
  • translates source code into ‘object code’
  • compiler is only held in RAM for the time that it takes to translate source code into object code
  • translates lines one after the other but does not execute a line immediately after translation
  • once created, object code can run independently of development environment and translator software
  • if the object code file contains errors, the program will crash or cause unexpected output. Programmers must revisit source code, identify and correct errors and recompile
  • used on finished, working programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Interpreter

A
  • each line of source code is directly translated to machine code one at a time
  • each line of code is executed as soon as it is translated
  • interpreter software is present in main memory during each execution of program and execution of every line
  • execution will stop immediately if the interpreter translates a line of source code that results in an error, and user will be notified
  • used on unfinished programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Concatenation

A

The operation of joining character strings end-to-end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Iteration

A

Returning to previous stages of the development process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Methods to save energy

A
  • settings on monitors
  • power down settings (eg standby)
  • leaving computers on standby
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Buses

A

Address bus:
- uni-directional, from the processor to RAM
- holds the address in RAM that the processor is accessing

Data bus:
- Bi-directional, between the processor and the memory

17
Q

Central Processing Unit

A

Handles the instructions used to ensure that hardware and software respond as expected. Tasks:
- fetch, decode and execute instructions from RAM
- perform arithmetic calculations
- perform logical operations
- control read, write, clock, interrupt and reset lines

18
Q

Arithmetic Logic Unit (ALU)

A

All calculations and logical decisions are handled by the ALU, eg storing real numbers. Tasks:
- performs all calculations
- performs comparisons on numeric values
- makes decisions based on logic (AND, OR, NOT)

19
Q

Registers

A

temporary storage locations within the processor. stores addresses, data or instructions

20
Q

RAM (Random Access Memory)

A

The processor can write to, or read from, RAM at high speed. RAM holds all the programs currently in use. Data can only be stored temporarily, all data in RAM is lost when the power is switched off

21
Q

ROM (Read Only Memory)

A

Data in ROM cannot be changed, this is fixed when the chip is manufactured. Data is stored permanently in ROM – it is not lost when the power is switched off

22
Q

ASCII

A

Stands for American Standard Code for Information Interchange
Each character (letter, number, symbol or control character) is represented by a binary value
Each character requires 1 byte (8 bits) of storage

23
Q

Malware

A

Short for malicious software. Types include:
* Viruses
* Trojans
* Worms
* Hacking
* Spyware
* Keylogger

24
Q

Firewalls

A

A program that helps stop hackers, viruses and worms from entering a computer over the internet. filters incoming and outgoing traffic. Only trusted users will be permitted access.

25
Q

Encryption

A

Data is scrambled so that it can only be understood by those with a key. Prevents hackers from being able to understand your data.

26
Q

Memory Addresses

A

The processor has to be able to pinpoint any storage location
needed so each storage location has its
own unique address

27
Q

Storing real numbers

A

mantissa x base^e

28
Q

Explain why it may be necessary to return to the design stage

A
  • logic errors were found at a later
    stage
  • new functionality is requested
  • the program is not fit for purpose
29
Q

Why are predefined functions used

A
  • no need to write code
  • error free (no need to test)
  • re-useable