paper 1 revision

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/69

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

70 Terms

1
New cards

What happens during lexical analysis

Breaks code into tokens — e.g. keywords, variable names, operators etc.

Removes whitespace

Creates a token table — e.g. a list of variable and function names and details

2
New cards

What happens during syntax analysis

Checks to see if the sequence of tokens follows the rules of the language

If code is correct, a syntax tree is created

3
New cards

What happens during code generation

Translates the syntax tree into machine code

Allocates memory locations for variables

4
New cards

What happens during code optimisation

Removes unnecessary instructions

Reorders instructions for better performance

5
New cards

What is utility software

Software designed to help analyse, configure, optimise and maintain a computer.

It supports the operating system, which is different to application software that performs tasks that benefit users.

6
New cards

Examples of utility software

Disk defragmentation, backup, security.

7
New cards

What is a linker

A program that combines different pieces of code and data into a single executable file.

8
New cards

What is a loader

A part of the operating system that loads an executable file into memory, in order to run it.

9
New cards
What is the big o notation for a program that has no loops
o(1)
10
New cards
what is the big o notation for a program that conducts a binary search / halves the dataset
o(log n)
11
New cards
what is the big o notation for a program that has a for / while loop in it
o(n)
12
New cards

what is the big o notation for a program that has a nested loop in it

o(nnumber of loops)

13
New cards

what is the big o notation for a program that is recursive & calls itself twice like the fibonacci sequence

O(2n)

14
New cards
pre-order
visit
left
right
15
New cards
in-order
left
visit
right
16
New cards
post-order
left
right
visit
17
New cards
level order
left to right
new level
18
New cards
benefits of recursion
natural way to process data structures, such as trees that are recursive by nature

fewer lines of code mean that the function is easier to read
19
New cards
drawbacks of recursion
harder to trace because you have to keep track of multiple instances of the function

uses more memory because of the need to store multiple stack frames

slower because of the need to manage stack operations
20
New cards
code for an oop constructor
class Pet
private name
public procedure new(givenName)
name = givenName
endprocedure
endclass
21
New cards
code to use constructor method
myDog = new Dog(“name”, “breed”)
22
New cards
code for getters and setters
public function get_score()
return score
end function

public function set_score(newscore)
score = newscore
end function
23
New cards
what is polymorphism
Polymorphism allows for two methods to have the same name, but have different outputs depending on either which class it is associated with, or which parameters are used.

class Animal {
public virtual void Speak() {
Console.WriteLine("The animal makes a sound.");
}
}

class Dog : Animal {
public override void Speak() {
Console.WriteLine("The dog barks.");
}
}

class Cat : Animal {
public override void Speak() {
Console.WriteLine("The cat meows.");
}
}
24
New cards
advantages of concurrent processing
more efficient use of processor time — less idle time, so more tasks can be completed in the same amount of time

fewer bottlenecks — programs that run become more responsive because idle time between hardware interactions can be filled

efficient processing of interrelated tasks -
25
New cards
list the four laws that u need to know
data protection act
computer misuse act
copyright designs and patents act
regulation of investigatory powers act
26
New cards
principles of the data protection act
data must be used fairly, lawfully and transparently
used for specified purposes
data is accurate and kept up to date
kept for no longer than necessary
handled securely, preventing unauthorised access
27
New cards
rights relating to data protection act
to be informed about how your data is being used
have incorrect data amended
have data erased
stop the processing of your data
28
New cards
offences in computer misuse act
unauthorised access to a computer
unauthorised acts that impair the operation of a computer
making tools that can be used in computer misuse offences
29
New cards
what does the copyright, designs and patents act cover
States the way that work is copied, adapted, broadcasted, lent etc. The act gives creators control over their work and prevents unauthorised use.
30
New cards
principles of the regulation of investigatory powers act.
demand that ISP provide access to customers digital communications
carry out mass surveillance of digitial communications
demand that someone hand over keys for encrypted data
keep secret the existence of interception, even in court
31
New cards
what is the commutative boolean law
X ^ Y = Y ^ X

X v Y = Y v X

think ‘commute’ back and forth to and from work — switching places
32
New cards
what is the associative boolean law
X ^ (Y ^ Z) = (X ^ Y) ^ Z
X v (Y v Z) = (X v Y) v Z

just move the brackets
33
New cards
what is the absorption law
X v (X ^ Y) = X
X ^ (X v Y) = X

absorb the odd one out
34
New cards
what is the distributive law
X ^ (Y v Z) = (X ^ Y) v (X ^ Z)

X v (Y ^ Z) = (X v Y) ^ (X v Z)

multiply out the brackets, then swap operator between new brackets
35
New cards

what is the de morgan’s law

NOT(X ^ Y) = NOT X v NOT Y
NOT(X v Y) = NOT X ^ NOT Y

add nots, and flip the operator

36
New cards

Requirements for first normal form(1NF)

  • contains atomic values

  • unique column names

  • primary key

37
New cards

Requirements for second normal form (2NF)

  • only applies to tables with composite keys

  • All non-key attributes must depend on the primary key of that table

38
New cards

Requirements for third normal form (3NF)

  • no transitive dependencies (no non-key is dependent on another non-key)

39
New cards

What are the four layers in the TCP/IP stack

Application

Transport

Internet

Link

40
New cards

What happens in the application layer of the TCP/IP stack

  • Application creates data you want to send

  • Adds a header which determines which protocol to use e.g. FTP, HTTP, SMTP

41
New cards

What happens in the transport layer of the TCP/IP stack

  • Breaks down data into packets

  • Numbers packets

  • Includes destination port number

42
New cards

What happens in the internet layer of the TCP/IP stack

  • Adds IP header to packet which includes:

    • Source IP

    • Destination IP

  • Routes the packet

43
New cards

What happens in the link layer of the TCP/IP stack

  • Adds a MAC address to the packet

  • Handles transmission using electrical signals

  • Includes error detection

44
New cards

explain why protocols are needed / important

  • Allowing devices to communicate with each other

  • As all devices will follow the same rules and standards

    • So that the devices can interpret the signals in the same way

45
New cards

how to handle hash collisions

linear probing

chaining

46
New cards

what is linear probing

When there is a collision, finds the next empty spacing

When checking, sees that original hashed value does not store data, then continues until found / next whitespace is found — therefore doesn’t exist

47
New cards

what is chaining

Using linked lists to handle collisions.

Adds item to the list at that hash value

48
New cards

Factors of RISC processor

More advanced compiler, due to more lines of code

More RAM is needed to store code

Pipelining possible because each instruction takes one clock cycle

49
New cards

how do magnetic storage devices store data

two magnetic states: polarised and unpolarised

polarised means head can read data by passing over the region — representing 1

50
New cards

what does pre-emptive mean

jobs can stop and start during their execution

e.g. MLFQ, shortest remaining time, round robin

51
New cards

list all of the scheduling algorithms

shortest job first

shortest remaining time

first come first serve

round robin

multilevel feedback queue

52
New cards

what does bios stand for

basic input output system

53
New cards

what does BIOS do

power-on self test, which checks to see that hardware is connected and functional

checks CPU clock, memory and processor is operational

tests for external memory devices connected to device.

54
New cards

stages of waterfall

analysis, design, implementation, evaluation, maintenance

55
New cards

what is spiral model used for

risk-heavy projects

56
New cards

what is RAD used for

requirements are unclear at the start — iterative methodology

57
New cards

what is asymmetric encryption

method encryption that uses two keys

public and private — mathematically linked

sent using public key, and only private key can decrypt

58
New cards

how to order sql queries

ORDER BY ColumnName;

// add Desc to end if want descending

59
New cards

how to join two tables

SELECT Movies.MovieTitle, Directors.DirectorName FROM Movie JOIN Director ON Movie.DirectorName = Director.DirectorName

60
New cards

how to update a record

UPDATE TableName

SET column1 = value1

WHERE userid = value

61
New cards

what does a DNS do

user sends domain request to server e.g. ‘google.com’, and dns returns IP address for that domain

62
New cards

advantages of client-server

data stored in one location — secure

central backups

data and resources can be shared

63
New cards

disadvantages of client-server

expensive to setup

if server fails — all fail

staff required to maintain server

64
New cards

advantages of peer-to-peer

cheaper to setup

allows users to share resources

easy to maintain

not dependent on one server

specialist staff not required

65
New cards

disadvantages of peer-to-peer

backups performed separately

poorer security

can be difficult to locate resources

66
New cards

what does a spider do

follows links from one webpage to another

retrieves information such as content, headings, links and metadata

data extracted is indexed

spider follows link to next page

67
New cards

how does the pagerank algorithm work

takes into account:

  • quality of inbound links

  • user engagement

  • dampening factor

it repeats this process many times

68
New cards

what is the dampening factor

the probability that a user does NOT follow a link on a page, and instead goes to a random page

usually 0.85

69
New cards

how to draw the d-type flip flop waveform

at every rising edge, Q = D

70
New cards