18
8/16/2019 9781471865824-Answers-final http://slidepdf.com/reader/full/9781471865824-answers-final 1/18 1 AQA A-level Computer Science Chapter 1 1 An algorithm is a sequence of instructions; independent of any programming language; to solve a problem; in a reasonable amount of time. (max 3 marks) 2 An algorithm is independent of any programming language; and does not have to follow strict syntactical guidelines; an algorithm must be clear and unambiguous to a human reader while a program only needs to be clear and unambiguous to the computer running the code. (max 3 marks) 3 It is important to ensure code is easily understood by yourself or other coders; if it needs to be maintained or developed further in the future. (max 2 marks) 4 Any four from below, 1 mark for data type and description. (max 4 marks) • Boolean – can only have two states represented by true or false • String – one or more alpha-numeric characters joined together • Integer – a whole number • Real or Float – a number consisting of a decimal point • Char or Character – a single alpha-numeric character • Array or List – a collection of similar data items collected under a single identifier 5 A variable is a named piece of memory that can have its contents changed during execution time; while a constant is a named piece of memory that cannot have its content changed. (max 2 marks, 1 mark for variable and 1 mark for constant) Chapter 2 1 Definite iteration has a finite number of loops to execute; indefinite iteration will repeat until or while a condition or criteria is met – this could be zero, one, a hundred, or an infinite number of times. (max 2 marks, 1 mark for definite and 1 mark for indefinite) 2 Maximum of 4 marks, 1 for each construct and description. (max 4 marks) • Sequencing is the concept of instructions following one another in a logical and sequential order. • Assignment  is the concept of allocating a value – either a piece of data entered by the user, the coder, or the results of some function – to a variable or constant for future reference. • Selection is the concept of choosing one path through the program over another dependent on the Boolean result of some test. • Repetition or iteration is the concept of repeating a process or block of code either a definite or indefinite number of times. 3 Any sensible answer that is deemed mark worthy. 1 mark for identifying a suitable syntax error and 1 mark for describing how it was solved. (max 2 marks) Chapter 3 1 A relational operator is used for comparison; for example “is x < y” compares two variables; A Boolean operator is used for combining or altering the results of a Boolean test; for example x < 10 AND x > 5 would combine the results of two tests and ensure they are both TRUE. (max 4 marks, 1 for each description and 1 for each example or expansion) 2 By using integer division, you can find the remainder or modulus of a number divided by 2; If the remainder is 0, then the number was even. If the remainder is 1, then the number was odd.  (max 2 marks, one for situation and one for expansion/clarification/example. Any suitable example of a situation is acceptable) Chapter 4 1 A subroutine is a section of code identified by name. (max 2 marks, 1 for each underlined section) 2 A local variable is accessible or has scope only within the subroutine in which it was created; a global variable is accessible or has scope across the whole program. (max 2 marks, 1 for each type of variable) 3 Using global variables can lead to unexpected results caused by them being created in one section of code and amended elsewhere, sometimes by other members of the team. Global variables can also be very wasteful of memory leading to inefficient code as they may be needed only for a brief time but the memory is allocated for the life of the program. (max 4 marks, 1 for points, 1 for expansions or explanations. Inverse explanations (from the point of view of local variables) are acceptable but the same  point from both points of view counts only once.) 4 When a problem is decomposed, it is split in to small chunks that can be easily managed. These small chunks can then be tackled with each one forming a subroutine. (max 2 marks, 1 for each underlined section) Now test yourself answers

9781471865824-Answers-final

  • Upload
    jomabi

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 1/18

1AQA A-level Computer Science

Chapter 11  An algorithm is a sequence of instructions;

independent of any programming language;to solve a problem; in a reasonable amountof time. (max 3 marks)

2  An algorithm is independent of anyprogramming language; and does not haveto follow strict syntactical guidelines; analgorithm must be clear and unambiguous toa human reader while a program only needsto be clear and unambiguous to the computer

running the code.  (max 3 marks)3  It is important to ensure code is easily

understood by yourself or other coders; if itneeds to be maintained or developed further inthe future. (max 2 marks)

4  Any four from below, 1 mark for data type anddescription. (max 4 marks)•  Boolean – can only have two states

represented by true or false•  String – one or more alpha-numeric

characters joined together•  Integer – a whole number

•  Real or Float – a number consisting of adecimal point

•  Char or Character – a single alpha-numericcharacter

•  Array or List – a collection of similar dataitems collected under a single identifier

5  A variable is a named piece of memory that canhave its contents changed during execution time;while a constant is a named piece of memory thatcannot have its content changed. (max 2 marks,1 mark for variable and 1 mark for constant)

Chapter 21  Definite iteration has a finite number of loops to

execute; indefinite iteration will repeat until or whilea condition or criteria is met – this could be zero, one,a hundred, or an infinite number of times. (max 2marks, 1 mark for definite and 1 mark for indefinite)

2  Maximum of 4 marks, 1 for each construct anddescription. (max 4 marks)•  Sequencing is the concept of instructions following

one another in a logical and sequential order.•  Assignment is the concept of allocating a value –

either a piece of data entered by the user, thecoder, or the results of some function – to avariable or constant for future reference.

•  Selection is the concept of choosing one paththrough the program over another dependenton the Boolean result of some test.

•  Repetition or iteration is the concept ofrepeating a process or block of code either adefinite or indefinite number of times.

3  Any sensible answer that is deemed mark worthy.1 mark for identifying a suitable syntax error and1 mark for describing how it was solved. (max 2marks)

Chapter 3

1  A relational operator is used for comparison;for example “is x < y” compares two variables; ABoolean operator is used for combining or alteringthe results of a Boolean test; for example x < 10AND x > 5 would combine the results of two testsand ensure they are both TRUE. (max 4 marks, 1 foreach description and 1 for each example or expansion)

2  By using integer division, you can find the remainderor modulus of a number divided by 2; If the remainderis 0, then the number was even. If the remainder is1, then the number was odd.  (max 2 marks, one for

situation and one for expansion/clarification/example. Anysuitable example of a situation is acceptable)

Chapter 4

1  A subroutine is a section of code identified byname. (max 2 marks, 1 for each underlined section)

2  A local variable is accessible or has scope only within 

the subroutine in which it was created; a globalvariable is accessible or has scope across the wholeprogram.  (max 2 marks, 1 for each type of variable)

3  Using global variables can lead to unexpectedresults caused by them being created in one sectionof code and amended elsewhere, sometimesby other members of the team. Global variablescan also be very wasteful of memory leading toinefficient code as they may be needed only for a brieftime but the memory is allocated for the life of theprogram. (max 4 marks, 1 for points, 1 for expansionsor explanations. Inverse explanations (from the pointof view of local variables) are acceptable but the same point from both points of view counts only once.)

4  When a problem is decomposed, it is split in tosmall chunks that can be easily managed. These

small chunks can then be tackled with each oneforming a subroutine. (max 2 marks, 1 for eachunderlined section)

Now test yourself answers

Page 2: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 2/18

2 Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

Chapter 5

1  Hierarchy chart

(Any 7 of second row = 1 mark, all 13 of second row = 2 marks; each subordinate with correct parent = 1 markeach)

      G     e      t      M     e     n     u      C      h     o      i     c     e

      D      i     s     p      l     a     y      M     e     n     u

      G     e      t      T     e     x      t      F     r     o     m      U     s     e     r

      D      i     s     p      l     a     y      P      l     a      i     n      T     e     x      t

      D      i     s     p      l     a     y      C      i     p      h     e     r      T     e     x      t

      G     e      t      K     e     y      F     o     r      C     e     a     s     a     r      C      i     p      h     e     r

      G     e      t      S      i     z     e      O      f      R     a      i      l      F     e     n     c     e

      E     n     c     r     y     p      t      U     s      i     n     g      R     a      i      l      F     e     n     c     e

      U     s     e      C     e     a     s     a     r      C      i     p      h     e     r

      D     e     c     r     y     p      t      U     s      i     n     g      R     a      i      l      F     e     n     c     e

      G     e      t      P     o     s      i      t      i     o     n     s      T     o      U     s     e

      G     e      t      V     a      l     u     e      F     o     r      N

      E     v     e     r     y      N      t      h      C      h     a     r     a     c      t     e     r      S      t     e

     g     a     n     o     g     r     a     p      h     y

GetTypeOfCharacter

 ApplyShiftToASCIICode

ForCharacter

  GetTextFromFile

Program

EncryptUsingRailFence

CipherText‘’

Count1 0

CipherText CipherText + OriginalText[Count2]

Count2 Count2 + SizeOfRailFence

Count1 = SizeOfRailFence?

Count2 < LEN(OriginalText)?

Return ciphertext

Count2 Count1

Count1 Count1 + 1

 Y

 Y

N

N

2  Flowchart

(max 5 marks: 1 mark for Start and End; 1 markfor first and third process boxes; 1 mark for third process box and first decision leading to correct place; 1 mark for count1← count1 + 1 box. 1 markfor second decision leading to correct place.)

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Page 3: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 3/18

3

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

3  Pseudo-code

  (max 5, 1 mark for each box)

PROCEDURE EncryptUsingRailFence (OriginalText, SizeOfRailFence)

END PROCEDURE

RETURN Ciphertext

END FOR

Ciphertext  ‘’

FOR Count1  0 TO SizeOfRailFence

Count2  Count1

END WHILE

CipherText  CipherText + OriginalText[Count2]

WHILE Count2 < LEN(OriginalText)

Count2  Count2 + SizeOfRailFence

4 a)  Trace table

  (max 4 marks, 1 for column x correct, 1 for rows1-3 of max correct, 1 for rows 4-7 of max correct,1 for output column correct)

 x  max OUTPUT0

3 3

6 6

3 6

7 7

4 7

5 7 7

b)  The algorithm finds and returns the largestnumber in a list.

Chapter 6

1  Object orientation is a programming paradigm inwhich the programmer defines objects which canhave both properties and methods or operationswhich they can carry out. (1)

2  A class is a piece of code used to define behaviourwhereas an object is an instance of a class. (max 2marks, 1 for each underlined section)

3  Inheritance allows a class to use the propertiesand methods of a parent class. Polymorphismallows one interface to have multipleimplementations depending on which object it isacting upon. Overriding allows an existing methodfrom a parent class to be redefined with newfunctionality in a child class. (max 3 marks, onefor each underlined section)

4  In composition aggregation, one object is composedof two or more existing objects and is entirelydependent upon them. Association aggregation iswhere one object is made up of one or more existing

objects but is not entirely dependent upon themfor its own existence. (max 2 marks, 1 for eachunderlined section)

 Appliance

Tablet

Inkjet Laserjet Inkjet-

multifunction

Laserjet-

multifunction

Printer Computer

5 a)  Inheritance diagram  (max 4 marks, 1 for each row connected to the

right parent, and 1 for the arrows pointing in theright direction)

b)  printer = class (applicance)

  private

  Manufacturer: String

  BlackCartridgeCode: String  PurchaseDate: Date

  (max 4 marks, 1 for printer = class(appliance)or other sensible way of showing inheritance,1 for private, 1 for manufacturer andblackcartridgecode as strings, 1 for purchasedate as date or other sensible data type)

c)  inkjet-multifunction = class (printer)

  private

  isWifi: Boolean

  (max 2 marks, 1 for inkjet-multifunction =

class (printer) or other sensible way of showinginheritance, 1 for having isWifi and a Booleandata type or other sensible data type)

Page 4: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 4/18

4 Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s Chapter 7

1  Static data structures usually store a setamount of data which is usually defined by theprogrammer. A dynamic data structure canuse more or less memory as required throughthe use of a heap. (max 4 marks, 1 for each

underlined section)2  Flowchart

(max 5 marks, 1 mark for each area in a dashedsection)

X 0

Start

X =

stop

 Y 0

X X + 1

 Y Y + 1

X 0 Y =

 Array[Y][X]

RANDOM NUM

 Y

N

N

 Y

3  A text file would be a suitable file to use whenstoring a list of names because the data is easilyorganised and can be read by a human. An imagefile would need to be stored as a binary file asit contains non-human-readable data. (max 4marks, 1 mark for each underlined example andexplanation; any reasonable example is acceptable)

Chapter 8

1 a)  The cards are in a linear format and can onlybe accessed from one end. This matchesthe way a queue works. (max 1 mark forunderlined section)

b) i)  FrontPtr = 8, RearPtr = 40, QSize = 33(max 1 mark for all three)

ii)  FrontPtr = 8, RearPtr = 3, QSize = 36(max 1 mark for all three)

iii) IF QSize = 0 THEN

  REPORT ERROR

  ELSE

  OUTPUT RevisionCarts[FrontPointer]

  QSize ← QSize – 1

  FrontPtr ← FrontPtr + 1

  IF FrontPtr > 40 THEN  FrontPtr = 1

  END IF

  END IF

  (max 6 marks, 1 for checking if queue isempty; 1 for error if queue is empty; 1 forthe rest of the algorithm occurring only if thequeue is not empty; 1 for outputting the cardat the correct position; 1 for incrementing theFrontPtr AND decrementing the QSize; 1 forstatement testing if the end of the queue has

been reached; 1 for setting the FrontPtr backto 1 if this is the case)

2 a)  LIFO means Last In, First Out. (1 mark for thisdefinition)

b) i) 

27

5

  iii) 

27

5

  ii) 

27

5

9

  iv) 

27

5

6

  (1 mark for each correct diagram)

  c)  A stack is used when storing the results ofa recursive algorithm. (max 1 mark, anyrelevant answer is acceptable)

3  A linear queue is accessible only from the front,and can be added to only from the rear end; acircular queue is also accessible only from the

front and can be added to only from the end, butthe pointers to front and end can “wrap around”to be able to re-use memory space; in a priorityqueue each item is given a priority and when anitem is removed from the queue it is the foremostitem of the highest priority, so some items may beskipped. (max 3 marks, 1 for each answer)

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Page 5: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 5/18

5

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

Chapter 9

1 a)  (max 3 marks; 1 mark for lines leading from/tonumber 1 and 2, 1 mark for lines leading from/to number 3 and 4, 1 mark for lines leading fromto number 5; –1 mark for any incorrect l ines)

2

13

45

b)  Unweighted (1 mark)

c)  An adjacency matrix is most useful whenthere are a large number of connections;an adjacency list would be more usefulwhen there are a relatively small number ofconnections. (max 2, 1 mark for each answer)

d)  For the graph to be a tree it would need to beundirected and have no cycles. (max 2, 1 foreach underlined section)

2  (max 3 marks, 1 mark for Bon Jovi and Iron Maidenwith correct parents, 1 mark for AC/DC, GreenDay and Metallica with correct parents, 1 mark forRolling Stones and Pink Floyd with correct parents)

Bon Jovi

 AC/DC

Foo Fighters

Green Day Metallica

Iron Maiden

Rolling Stones

Pink Floyd

Chapter 10

1 a)  Organising by hash rather than alphabeticalorder allows for faster storage and retrievalof data. (max 2 marks, 1 for each underlinedsection)

b)  A collision is the term used when the hashingalgorithm creates the same hash for two ormore different data items. (max 1 mark)

c)  When a collision occurs in storage, one pieceof data may not be stored or may overwrite theother; one solution to this would be to probefor the next empty slot available and insert thedata there. (max 2 marks, one for the effectand one for the solution; any relevant solution isacceptable)

2  An array is indexed by number; while a dictionary isindexed by a string or character sequence known asa key. (max 2 marks, one for  each section)

Chapter 11

1  Vector addition has the effect of translating/displacing the vector while scalar-vectormultiplication scales/enlarges or shrinks thevector without altering its direction. (1 markeach for each underlined section; max 2)

a)  (max 1 mark for both correct arrows)

5432100

1

2

3  A 

B

4

5

b)  (max 1 mark for correct drawing)

5432100

1

2

3 A 

B

 A + B

4

5

c)  A.B = AxB

x+A

yB

y

  = 2 × 2 + 3 × 1 [1] 

  = 4 + 3

  = 7 [1] 

  (max 2 marks where indicated; if final answer iscorrect and any working is shown then full marksshould be awarded)

Page 6: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 6/18

6

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

Chapter 12

1  F, C, D, M, G, P (max 3, 1 for each pair in thecorrect order)

2  F, C, M, D, G, P (max 3, 1 for each pair in thecorrect order)

Chapter 13

1  The purpose of Dijkstra’s shortest path algorithmis to find the shortest path between two nodeson a graph datatype. (max 1 mark for underlinedsection)

2  Dijkstra’s shortest path algorithm requires aweighted graph with positive weights only on theedges. (max 2, 1 mark for each underlined section)

3  (max 5 marks, 1 for each correct row)

Step Vertex Carlisle Newcastle Middlesbrough Leeds Scarborough

1 Carlisle 0C

59C

∞C

126C

∞C

2 Newcastle 0C

59C

100N

126C

∞C

3 Middlesbrough 0C

59C

100N

126C

149M

4 Leeds 0C

59C

100N

126C

149M

5 Scarborough 0C

59C

100N

126C

149M

Chapter 14

1  A linear search starts at the beginning of a dataset and tests each element in turn until it findsthe one it is looking for. It may be faster thana binary search when data is unordered andwould be suitable for searching for a word in asentence. (max 3, 1 for each underlined section;any suitable example is acceptable)

2  A binary search repeatedly checks the middleelement and discards half of the data set until itfinds the element it is looking for. It may be fasterthan a linear search when data is ordered andwould be suitable for searching through a school

register for a particular student. (max 3, 1 foreach underlined section; any suitable example isacceptable)

3 a)  873 (max 1 for correct answer)

b)  10 (max 1 for correct answer)

Chapter 15

1 a)  3 /4 (max 1 for correct answer)b)  7 + 2 (max 1 for correct answer)

c)  3 * (5 + 2) (max 2, 1 for 3 *, 1 for 5 + 2 inbrackets)

d)  (3 + 4) * 9 (max 2, 1 for 3 + 4 in brackets, 1 for * 9)

2 a)  4 2 +  (max 1 for correct answer)

b)  9 4 / (max 1 for correct answer)

c)  4 3 + 2 * (max 2, 1 for 4 3 +, 1 for 2 *)

d)  7 5 + 2 1 + / (max 2, 1 for 75 +, 1 for 2 1 + /)

3  (max 3, 1 for stack 1 and 2, 1 for stack 3 and 4, 1 forstack 5, 6 and 7)

4 4 6 6 6 6 12

22 1

((4 + 2)/1)*2

Page 7: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 7/18

7

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

Chapter 16

1  FUNCTION bubbleSort(alist)

  FOR passnum ← LEN(alist) TO 0 STEP -1//Backwards FOR loop

  FOR i ← 0 TO passnum

  IF alist[i] > alist[i+1]  THEN SWAP alist[i], alist[i+1]

  END FOR

  END FOR

  RETURN alist

  END FUNCTION

  (max 3, 1 for outer loop with valid looping criteria,1 for inner loop with valid looping criteria, 1 forvalid IF statement and swapping items; comparativeflowchart or other working pseudo-code alsoacceptable)

2 a)  [4, 2, 6, 3, 8, 1, 7, 9]  [2, 4, 3, 6, 1, 7, 8, 9]

  [2, 3, 4, 1, 6, 7, 8, 9]

  [2, 3, 1, 4, 6, 7, 8, 9]

  [2, 1, 3, 4, 6, 7, 8, 9]

  [1, 2, 3, 4, 6, 7, 8, 9]

  (max 3 marks, 1 for 2 rows correct, 2 for 4 rowscorrect, 3 for all 6 rows correct)

b)  (max 4 marks, 1 for rows 1–4, 1 for rows 5–8,1 for rows 9–11, 1 for rows 12–14; any otherformat is acceptable as long as it is clear what ishappening)

  1 Split [4, 6, 2, 9, 3, 8, 1, 7] → [4, 6,2, 9] and [3, 8, 1, 7]

  2 Split [4, 6, 2, 9] → [4, 6] and [2, 9]

  3 Split [4, 6] → [4] and [6]

  4 Merge [4, 6]

  5 Split [2, 9] → [2] and [9]

  6 Merge [2, 9]

  7 Merge [2, 4, 6, 9]

  8 Split [3, 8, 1, 7] → [3, 8] and [1, 7]

  9 Split [3, 8] → [3] and [8]

10 Merge [3, 8]

11 Split [1, 7] → [1] and [7]

12 Merge [1, 7]

13 Merge [1, 3, 7, 8]

14 Merge [1, 2, 3, 4, 6, 7, 8, 9]

Chapter 17

1  Abstraction is the concept of removing unneededcomplexity from a problem leaving just the detailneeded to solve the problem. (max 2 marks, 1 foreach underlined section)

2  Automation is the process of creating computermodels of real life situations and putting them in toaction. (max 2 marks, 1 for each underlined section)

3  Decomposition is the process of splitting aproblem in to small manageable tasks. (max 2marks, 1 for each underlined section)

4  (max 4, 1 for inputting height and base (could bein same segment), 1 for calculating area, 1 formultiplication, 1 for dividing by 2; parent/childrelationship must be maintained for marks)

Calculate area

of triangle

Multiply height

by base

Divide result

by 2

Input height Input base Calculate area

Chapter 18

1 a)  The accepting state of a Finite State Machine isthe state the system must end in for the inputto have been valid. (max 1 mark for underlinedsection)

b)  (max 3 marks, 1 for each input andcorresponding new state)

Input New State

10 S10

20 S20

50 S50

c)  10,20,20

  50

  20,20,10

  (max 3, 1 for each correct input pattern; any valid pattern is acceptable)

d)  See table on next page.

  (max 4, 1 for correct rows 1 and 2, 1 for correctrows 3 and 4, 1 for correct rows 5,6 and 7, 1 forcorrect rows 8, 9 and 10; note that rows do not

need to be in this order)

Page 8: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 8/18

8

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

Input Current State New State

10 S0 S10

20 S0 S20

50 S0 S30

10 S10 S20

20 S10 S3010 S20 S30

20 S20 S40

10 S30 S40

20 S30 S50

10 S40 S50

Chapter 19

1  A Turing machine is developed to solve a specific

problem whilst a Universal Turing machine cansimulate any other Turing machine. (max 2, 1mark for each underlined section)

2  Turing machines produce a model of what is, andis not computable. (max 1 mark for underlinedsection)

3 a)  (max 4, 1 for rows 1 and 2, 1 for rows 3 and 4,1 for rows 5 and 6, 1 for row 7)

1 1 0 1 0 Current State:

Current State:

Current State:

Current State:

Current State:

Current State:

Current State:

1 1 0 1 0

1 1 0 1 0

1 1 0 1 0

1 1 0 1 0

1 1 0 1 0

1 1 0 1 0 0

S1

S1

S1

S1

S1

S1

S2

b)  Multiplies the binary number by 2 (max 1 markfor correct answer; note that “adds a 0 on to theend” is not enough)

Chapter 20

1 a)  Zero or more a followed by one b, e.g. b, ab,aab, aaab, ad infinitum. (max 1 mark fordescription and/or examples)

b)  One or more c followed by one d, e.g. cd, ccd,cccd, ad infinitum. (max 1 mark for descriptionand/or examples)

c)  Zero or one e followed by one f, e.g. e, ef. (max1 mark for description and/or examples)

2  a(bc)?e* (max 2, 1 for a(bc)? and 1 for e*)

3  <digit> ::= 0|1|2|3|4|5|6|7|8|9

  <integer> ::= <digit>|<digit><integer>

  <real> ::= <integer> . <integer>

  <symbol> ::= + |/|−|*

  <sum> ::= <real> <symbol> <real>

  (max 4, 1 for defining a digit, 1 for defining an integer

and a real number (or any other relevant way ofdefining a real number), 1 for defining symbol and 1for defining sum; note that names should be relevantbut do not need to match)

Chapter 21

1 a)  A ∪ B = {A, E, I, O, U, H, L} (max 1 mark forcorrect answer)

b)  Cartesian Product = {(A,H), (A,E), (A,L), (A,O),(E,H), (E,E), (E,L), (E,O), (I,H), (I,E), (I,L), (I,O),(O,H), (O,E), (O,L), (O,O), (U,H), (U,E), (U, L),

(U, O)} (max 1 mark for correct answer)

c)  A ∩ B = {E, O} (max 1 mark for correct answer)

d)  A ∆ B = {A, I, U, H, L} (max 1 mark for correctanswer)

2  When a set has cardinality, it can be set to becountable using natural numbers. Its cardinalityis the number of elements in the set. (max 1mark for underlined section)

3  A = { x | x  ∈  ∧  x  ≤ 4} (max 2 marks, 1 for first halfup to ^, 1 for second half after ^; ^ must be includedfor both marks)

Chapter 22

1  An unsolvable problem is something that cannotbe calculated at all. An intractable problem canbe calculated, but not in a useful amount of time.(max 2 marks, 1 for each underlined section)

2  The halting problem is important because itshows us that there are some problems thatcannot be solved. (max 1 mark for underlinedsection)

3  When faced with an intractable problem, aprogrammer will often use a heuristic approach,accepting a sub-optimal solution. (max 2 marks,1 for each underlined section)

Page 9: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 9/18

9

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

4  (max 2 marks, 1 for most and least efficient incorrect places, 1 for middle two in correct places)

Most efficient O(N)

O(N log N)

O(N2)

Least efficient O(2N)

Chapter 23

1 a)    (max 1 mark for correct answer)

b)    (max 1 mark for correct answer)

c)    (max 1 mark for correct answer)

2 a)  ½   (max 1 mark for any correct answer)

b)  2 (max 1 mark for any correct answer)

c)  1 (max 1 mark for any correct answer)

3  Ordinal numbers are numbers used to identify theposition of something relative to other numbers,in the case of ASCII each symbol is designated anumber within the set. (max 2 marks, 1 for eachunderlined section)

4  When a set is well-ordered, the contents arerelated and in a defined order. (max 1 mark forunderlined section)

Chapter 24

1  Gi (max 1 mark for correct answer)

2  01110000 (max 1 mark for correct answer)

3  218 (max 1 mark for correct answer)

4  244 (max 1 mark for correct answer)

5  77 (max 1 mark for correct answer)

6  A programmer may use hexadecimal to savespace on screen when viewing code or data,and to aid in recognition of commands. (max 2marks, 1 for each underlined section)

Chapter 25

1 a)  11001100 // 204 (max 1 mark for correctanswer, either binary or decimal answer isacceptable)

b)  11101100 // 236 (max 1 mark for correctanswer, either binary or decimal answer isacceptable)

2 a)  00101101 (max 1 mark for correct answer)

b)  10110101 (max 1 mark for correct answer)

c)  10001011 (max 1 mark for correct answer)

3  94 into binary = 01011110. Convert 45 to –45, inbinary = 11010011

  (max 2 marks, 1 for correct conversion of –45 tobinary, 1 for correct final number 00110001)

0 1 0 1 1 1 1 0

1 1 0 1 0 0 1 1 +

1 1 1 1 1

0 0 1 1 0 0 0 1

4 a)  00100.110 (max 2 marks, 1 for correct wholenumber, 1 for correct fraction)

b)  10011.010 (max 2 marks, 1 for correct wholenumber, 1 for correct fraction)

c)  00110.011 (max 2 marks, 1 for correct wholenumber, 1 for correct fraction)

5 a)  27.625 (max 2 marks, 1 for correct wholenumber, 1 for correct fraction)

b)  22.125 (max 2 marks, 1 for correct wholenumber, 1 for correct fraction)

c)  14.9375 (max 2 marks, 1 for correct wholenumber, 1 for correct fraction)

6 a)  Exponent = 3, so DP needs “bouncing” 3 placesto the right, leaving: 1001.1100 2’s complement= –6.25 (max 2 marks, 1 for working, 1 forcorrect final value)

b)  Exponent = –1, so DP needs “bouncing” 1 placeto the left, leaving 0.01100000 2’s complement= 0.375 (max 2 marks, 1 for working, 1 forcorrect final value)

7  –117 in 2’s complement binary is 10001011.0 [1] .

The mantissa should be 1.0001011 [1] . To makethat happen the binary point needs to “bounce”7 points to the left. Because we are doing thisin reverse, going left is a positive number so weneed our mantissa to be 7, 0111 [1] . (max 3 marksas indicated)

8 a)  To represent 7 we need to use 4 bits, so themantissa needs to be 0111 [1] . This leaves 4bits for the exponent, 0.5, 0.25, 0.125, 0.0635.Using these numbers the closest we can get to0.9 is 0.875 (.1110) for the exponent [1]  giving us0111.1110 for our binary number. The DP would

need to “bounce” 3 points to the left, so ourmantissa would be 0.1111110 and the exponentwould be 0011 [1] . (max 3 marks as indicated)

b)  The absolute error is 7.9 – 7.875 = 0.025. (max1 mark for correct final value)

c)  The relative error is 0.025 / 7.9 =0.00316455696, or 0.0032 to 2 s.f. (max 1 mark for correct final value)

Page 10: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 10/18

10

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

Chapter 26

1  ASCII uses 7 or 8 bits per character andrepresents only Latin characters and extendedsymbols. Unicode uses 16 bits per character andcan represent any character and language. (max2 marks, 1 each for underlined sections or converse

statements)2  Unicode contains ASCII as a subset so every

ASCII character can also be stored in Unicode.ASCII characters have the same character codesas they do in Unicode. (max 2 marks, 1 each forunderlined sections)

3  Parity checks are quick and relatively cheapin terms of data transmission, but only detectsingle errors and cannot repair data; check digitsrequire a lot of processing but detect any numberof errors, they cannot repair data; majorityvote can catch a lot of errors and requires little

processing; it can repair errors but takes threetimes the amount of data for transmission. (max3 marks, 1 for each section)

4  Resolution is w × h = 1000 × 600 = 600 000 pixels;storage space = resolution × bit depth = 600 000× 12-bits = 7 200 000 bits = 900 000 bytes = 900kilobytes. (max 2 marks, 1 for resolution and 1 for size)

5  Line colour, fill colour, line thickness. (max3 marks for any three sensible answers)

6  Bitmap images can show very fine detail but cantake up large amounts of space. When zoomed inthey lose quality (pixelate). Vector images are betterfor geometrical images rather than photographicimages but images intended to cover very largesizes can have very small file sizes and do not losequality when enlarged. (max 4, 1 each for any of theunderlined sections)

7 a)  44 000 Hz * 16 bits = 704 000 bits per sample(88 000 bytes per sample). 88 000 * 150 seconds= 13 200 000 bytes = 13.2 megabytes for thesong. (max 2 marks, 1 for sample size,1 for song size)

b)  If the song was stereo, it would havetwo channels and the file size would be

doubled. (max 1 mark for underlined section)c)  22 000 Hz (max 1 mark for correct answer)

8  Lossy compression can often produce significantlysmaller files, but some information which thealgorithm deems less important is lost; losslesscompression can reproduce the original file in itsentirety but may not save as much space. (max 2marks, 1 each for the underlined sections)

9 a)  Run length encoding traverses the file lookingfor repeated patterns. When it identifies them, itreplaces the pattern with one copy of the pattern,and the number of times it is repeated. (max 3

marks, 1 each for the underlined sections)

b)  Dictionary-based encoding traverses the filelooking for looking for regularly used patterns.When it finds them, it puts them in a dictionaryand assigns them a token which is insertedin the file in the place of the pattern. (max 3marks, 1 each for the underlined sections)

10 a)  Lossy (max 1 mark for correct answer)

b)  Lossless (max 1 mark for correct answer)

c)  Lossless (max 1 mark for correct answer)

Page 11: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 11/18

11

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

Chapter 27

1  A cipher deemed computational secure istheoretically breakable, but not using currenttechnology. (max 2, 1 each for underlinedsections)

2  The Caesar cipher is relatively easy to crack anduses substitution to produce the cipher text. TheVernam cipher is computationally impossibleto crack and uses one-time pads of randomcharacters to produce the cipher text. (max 4marks, 1 each for underlined sections)

3  Frpsxwhu Vflhqfh lv juhdw (max 1 mark forcorrect answer)

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

Chapter 281  An interpreter goes through source code one line

at a time and executes it accordingly; a compilerwill convert the whole source document in toobject code in one go; an assembler translatesassembly code straight in to object code in a1-to-1 relationship. (max 3 marks, 1 for eachtranslation tool)

2  Keyboard, mouse, monitor (max 3 marks for any3 suitable points)

3  An operating system acts as a virtual machinebetween the user and the hardware. Theoperating system is required to manage processorallocation, ensuring tasks have access to theCPU cores as and when needed. It handlesperipheral management, enabling differingperipheral devices to be controlled by softwareas required. It also handles the allocation ofmemory to processes from the heap as neededto ensure each process has enough memory toperform its actions without conflicting with otherprocesses. (max 7 marks, 1 for defining a virtualmachine, 1 each for relevant points and explanations/ 

examples; any suitable responsibilities acceptable)

Chapter 29

1 a)  Writing a desktop application as there aremany pre-written routines available toimperative languages to save developmenttime. (max 2 marks, 1 each for exampleand justification; any suitable example and justification acceptable)

b)  Performing mathematical calculations

because functional languages lend themselves

in terms of their syntax to easily understoodcalculations and formulae. (max 2 marks, 1each for example and justification; any suitableexample and justification acceptable)

c)  Querying a database because you want to beable to tell the database what informationyou want and let the database managementsystem decide how best to do that on theunderlying architecture in place. (max 2marks, 1 each for example and justification; anysuitable example and justification acceptable)

d)  Gaming graphics coding as the processor-intensive routines mean speed and efficiencyneed to be as optimal as possible. (max 2marks, 1 each for example and justification; anysuitable example and justification acceptable)

e)  When writing code for a custom chip such asan embedded ECU in a car, since there may notbe an HLL or assembler available for relativelysmall production run systems. (max 2 marks,1 each for example and justification; any suitableexample and justification acceptable)

2  An interpreter reads one line at a time and

executes it directly, repeating this process asregularly as needed. A compiler translatesthe entire file in one go prior to allowing it tobe executed, meaning each line of code onlyneeds translating once. (max 4 marks, 1 foreach underlined section or any other sensiblecomparison)

3  A developer may want to use a bytecode basedlanguage such as Java when they are developingfor multiple systems but do not want to have torecompile for each one, and where speed is tooimportant to rely on an interpreted language. (max2 marks, 1 for each underlined section)

Page 12: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 12/18

12

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

Chapter 30

1 a)  (max 1 mark for correct table)

A B Q

0 0 0

0 1 01 0 0

1 1 1

b)  (max 1 mark for correct table)

A B Q

0 0 0

0 1 1

1 0 1

1 1 1

c)  (max 1 mark for correct table)

A Q

0 1

1 0

d)  (max 1 mark for correct table)

A B Q

0 0 0

0 1 1

1 0 1

1 1 0

e)  (max 1 mark for correct table)

A B Q

0 0 1

0 1 1

1 0 1

1 1 0

f)  (max 1 mark for correct table)

A B Q

0 0 1

0 1 0

1 0 0

1 1 0

2  De Morgan’s laws state that NOT (A AND B) is thesame as NOT (A) OR NOT (B), and conversely thatNOT (A OR B) is the same as NOT (A) AND NOT(B). This allows logical circuits to be simplified,saving cost in production. (max 3 marks, 1 each forunderlined sections)

3 a) A B A B [1]  

A B A B  

B A B [1]  

A B 

. + + (DML)

+ + ( . )

+ ( . ) = B (Absorbtion law)

+ [1]

 

(max 3 marks as indicated)

b)  C + C = C [1] 

  C + D [1] 

  (max 2 marks as indicated)

4 a)  Answer: 1 (max 3, 1 mark for 4th and 6th columns,1 mark for 7 th column, 1 mark for correct answer)

A B   A A.B A.B   A.B ( .B+A.B)

0 0 1 0 0 1 1

0 1 1 1 0 1 1

1 0 0 0 0 1 1

1 1 0 0 1 0 1

b)  Answer: C + D  (max 3, 1 mark for 3rd  and 4th columns, 1 mark for 5 th column, 1 mark foridentifying the final answer correctly)

C D C.D   D C.D + C + D

0 0 0 1 1

0 1 0 0 0

1 0 0 1 1

1 1 1 0 1

5  Answer: The two final columns are identical.(max 3 marks, 1 for each table and 1 for concludingcomment)

A B A.B   A.B

0 0 0 1

0 1 0 1

1 0 0 1

1 1 1 0

A B   A   B   A   B+

0 0 1 1 1

0 1 1 0 1

1 0 0 1 1

1 1 0 0 0

Page 13: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 13/18

Page 14: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 14/18

14

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

Chapter 32

1 a)  Increasing the clock speed allows morecalculations to happen each second.(max 1 for underlined section)

b)  Increasing the width of the address busallows more memory locations to beaccessible. (max 1 for underlined section)

2  A bus is a series of parallel wires used toconnect the internal components of the CPU.(max 2 marks, 1 for each underlined section)

3 (b)  (max 1 mark for correct answer)

Chapter 33

1  The Status Register keeps track of the status ofvarious parts of the computer such as whetheran overflow error has occurred. The Current

Instruction Register stores the instruction that iscurrently being executed by the processor. TheProgram Counter stores the memory locationof the next instruction that will be needed bythe processor. (max 6 marks, 3 × 1 for relevantregisters, 3 × 1 for appropriate descriptions)

2  Increasing the clock speed means the calculationsand movement of data will happen more frequentlymeaning more calculations are performed persecond. (max 2 marks, 1 for each underlined section)

3  The contents of the program counter istransferred to the memory address register;

Simultaneously the contents of the programcounter are incremented; and the contents ofthe memory location address are loaded into thememory buffer register; The contents ofthe memory buffer register are copied into thecurrent instruction register; the instructionsis decoded; and finally the instruction isexecuted. (max 6 marks, per section)

Chapter 34

1  Immediate addressing loads the data directly

from the operand, while direct addressingtells the CPU to get the data from a memoryor register address. (max 2 marks, 1 for eachunderlined section)

2  The opcode is an instruction to perform a task,while the operand is the thing the opcode mustuse to perform the task. (max 2 marks, 1 for eachunderlined section)

3  (max 6 marks, 1 per 2 lines except final 3. Note thatlabels do not have to match but should be sensible).  LDR R3, 1  LDR R4, 2  CMP R3, R4  BGT morethan  BLT lessthan

  MOV R1, #3  HALT  morethan:  MOV R1, #1  HALT  lessthan:  MOV R1, #2

  HALT

Chapter 35

1  The RFID tag is placed near a reader which emitselectromagnetic power; the power energises theRFID chip; which transmits its ID code; the readerdetects this code and passes it to a computer tobe dealt with. (max 4 marks, 1 for each section)

2  A drum rotates inside the printer and is coatedin a chemical which holds an electrical charge;the laser beam is directed onto the drum which

alters the charge in the chemical; the drum picksup toner on the charged area and passes it to theoppositely charged paper; the toner is then fusedto the paper using heat. (max 4 marks, 1 for eachsection)

3  Light coming through the lens is focussed on toa sensor; the sensor is made up of transistorswhich record the light and correspond to pixels;the data is stored onto flash memory; and canbe transferred to a computer for editing andviewing. (max 4 marks, 1 for each section)

4  Hard drives have rotating platters which store

the data while SSDs have no moving parts. Harddisk platters are covered in a film of magneticmaterial which has its charge changed when datais stored, while SSDs use NAND memory chipsmade up of semiconductors. Because a hard diskhas to move its read/write head to the correctlocation, there can be some lag before findingthe right location. SSDs do not suffer this lag asthere are no moving parts. (max 6 marks, 1 perunderlined section)

Chapter 361  Some might believe that because MP3s are easily

accessible, there is no problem with downloadingthem; however, if you download them from anunofficial website instead of buying them, theartist does not receive any payment for the workthey have done. This could lead to them notproducing more music in the future. Originalworks are covered by the Copyright, Designsand Patents Act and it is illegal to duplicatecopyrighted material without permission. Bydownloading a song, you are duplicating it

onto your hard drive, and so in breach of thelaw. (max 6 marks as identified or other relevant points/expansions)

Page 15: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 15/18

15

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

2  The law is a legal set of commands that one mustfollow and can be enforced by the police. A codeof conduct is a guide of how things should be doneand is not legally enforceable. (max 4 marks, 1 per identified underlined section or other relevant point/expansion)

3  Monitoring what a student is doing could be a

breach of their privacy, and could lead to thecollege gathering personal information thatthe student does not want to share. However,students are expected to follow a code of conductwithin the college, and the college has to beable to enforce this. As such the college needsto make it clear in advance what it will monitorand gather, and the student has to ensure theydo not break the regulations or they may end upbeing disciplined according to the internal collegepolicies. (max 6 marks, 1 per identified underlinedsection or other relevant point/expansion)

Chapter 37

1  Bit rate describes the speed that a transmissionis taking place at; the baud rate is the number ofelectronic state changes per second; althoughunusual, it is possible to send multiple bits per statechange; bandwidth is the capacity of the channeldown which the data is being transmitted.(max 4 marks, 1 for each section)

2  The cost of implementing parallel transmissionscan be prohibitive due to needing many times the

amount of transmission media and associatedhardware; additionally, ensuring that signals arein sync across multiple transmission media canbe difficult to manage. (max 2 marks, 1 for eachsection)

3  Protocols are accepted sets of rules agreed uponand followed to allow different computers tocommunicate with one another. (max 1 mark forunderlined section)

Chapter 38

1  A LAN covers a small geographical area,normally one building or small site. A WANcovers a large geographical area, often multiplesites. (max 2 marks, 1 per section)

2 a)  A peer-to-peer network might be usedat home because there is no need for thelevel of security offered by a client-servernetwork. (max 2 marks, 1 for example and1 for justification)

b)  A client-server network might be used inschool where computers regularly break andcan be replaced without needing to worryabout rescuing files and software. (max 2marks, 1 for example and 1 for justification)

3  CSMA/CA checks first whether the transmissionmedium is idle; if it is, it sends the data, but if notit will wait a random amount of time and then tryagain; on receipt of the data an acknowledgementis sent back to the sending device; if this is notreceived, then the data is resent. (max 3 marks)

4  The SSID can be stopped from broadcasting itself;

strong encryption [WPA/WPA2] can be used; anda white list of allowed MAC addresses can becreated. (max 3 marks)

Chapter 39

1  The Internet is a physical network of networks;whilst the World Wide Web is a software serviceavailable on the Internet. (max 2 marks, 1 foreach section)

2  https is the protocol;

  www is the name of the host machine;  coolcomputing.com is the name of the domain;

  /pages is the directory the files are located in onthe server;

  index.html is the file name being accessed;

  (max 3 marks, for any 3 of the above)

3  43.123.32.5 is the IP address of the machine beingaccessed.

  23 is the port number of the service beingaccessed (max 2 marks, 1 for each point above)

4  IPv4 addresses work on every computer and

system available. However, there are very few ifany IPv4 addresses left available and as such theyare quite expensive to buy. IPv6 addresses are notyet supported by every available system so theremay be some compatibility problems. However,there are many addresses available so theyshould be more cost-effective. (max 6 marks,1 mark for each underlined point or other relevant point/expansion)

Chapter 40

1  Firewalls block ports and programs that try togain unauthorised access to the computer, whileproxy servers hide the internal network from theInternet. (max 2 marks, 1 per underlined section)

2  Both computers have a public key [1]  and a privatekey [1]  which are mathematically connected [1] .

  The sender uses the receiver’s public key toencrypt the file [1] .

  The receiver uses their own private key to decryptthe file [1] . (max 5 marks as indicated)

3  The certificate contains the name of the company,

its server details, and a serial number. This serialnumber can be used to check the details withthe issuing authority to ensure they are who they

Page 16: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 16/18

16

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

Exam practice answers at www.therevisionbutton.co.uk/myrevisionnotes

say they are. (max 2 marks, 1 for each underlinedsections)

4  A Trojan hides within another file on your computerand does not replicate itself so can remainundetected for a long time. A virus attaches itselfto another file and replicates itself spreading bothinternally and across a network. A worm does not

need to be attached to another file to spread aroundand infect other machines. (max 6 marks, 1 perunderlined section)

5 a)  A user can protect against malware byinstalling and using up-to-date anti-virussoftware. They can use a firewall to blockworms from spreading across the networkand most importantly need to be careful whenopening file attachments. (max 3 marks,1 per underlined section or other reasonablemethodology)

b)  A programmer must thoroughly test code for

exploitable errors, and should update code asnew security threats come to light. All datastored within a program should use acceptedand recognised encryption techniques.(max 3 marks, 1 per underlined section orother reasonable methodology)

Chapter 41

1  The application layer on the client chooses thecorrect protocol – in this case HTTP or HTTPS[1] . This layer interacts with the web browser

and passes data down to the transport layer [1] .The transport layer establishes an end-to-endconnection between the client and the server [1]  and identifies relevant port numbers [1] . It thensplits the data into numbered packets [1]  anddeals with error control [1] . The network layeradds source and destination IP addresses [1] .The link layer then adds source and destinationMAC addresses [1]  and deals with putting thedata on to the physical transmission medium [1] .The server receives the data and the link layerremoves the MAC addresses [1] . Data is passed

up with the source IP address and port numberbeing remembered for returning the data. Thetransport layer reassembles the data packetsin order [1]  and passes the request up to theapplication layer which deals with the request [1] .The response is passed back down the stack andreturned to the client in the same way, using theclient IP address and port [1] .

(max 8 marks, 1 each for identified points above. for1–2 marks must have mentioned at least one layer,for 3–4 marks must have mentioned at least twolayers, for 5–6 must have mentioned at least three

layers and for 7–8 marks must have mentioned all

four layers; note this would be marked as a QWC[Quality of written communication] question)

2  https uses a secure connection and encryptsdata, while http does not. (max 1 mark for correctanswer)

3  Protocols are accepted sets of rules agreed uponand followed to allow different computers to

communicate with one another. (max 1 mark)4  Six (one for the web page itself, three for the

images, one for the movie and one for the script;the other web pages will not be requested untilclicked on) (max 1 mark)

Chapter 42

1  The client makes a request of the server. Theserver responds to that request, and thenprovides the requested service. (max 3 marks, 1

for each underlined section)2  CRUD describes the main functions that can beperformed on a database: create data, retrievedata, update data and delete data. (max 5 marks,1 for each underlined section)

3  An API usually consists of standardisedsubroutines that allow one program to interfacewith another one. (max 2 marks, 1 for eachunderlined section)

4  I would recommend a thick-client solution [1] .For only eight users, the cost of a number ofdedicated servers [1]  might not make up for

the saving in cost of the clients [1] . Because thecompany does a lot of analysis, performing thison the servers may block the other users fromperforming their own analysis [1]  so it may bemore effective to do this on the local client PCs[1] . Such a small company probably couldn’tafford a dedicated IT support team to support theneeds of a more complex network [1] . (max 6marks for identified points, alternative views allowedas long as justified)

Chapter 43

1 a)  A database that is in third normal formsatisfies the requirements of second normalform, and has had non-key attributes thatdepend upon other non-key attributesremoved. (max 2 marks, 1 for each underlinedsection)

b)  Storing data in normal form ensures thatthere is no redundant data (saving space) andthat data is not stored multiple times (leadingto inconsistency). (max 2 marks, 1 for eachunderlined section)

Page 17: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 17/18

17

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

AQA A-level Computer Science

c)  (max 4 marks, 1 per relationship; max 2 if anyincorrect relationships drawn)

CustomerOrderLine Unit

CustomerOrder Customer

2  Items (item, colour)

  Prices (item, price)

  Taxes (price, tax)

  (max 3 marks, 1 per line with correct primary keys)

Chapter 44

1 a)  SELECT Borrower.Forename, Borrower.

Surname  FROM Borrower, Bike, Loan

  WHERE Borrower.MemberID = Loan.MemberID AND Loan.BikeID = Bike.BikeIDAND Bike.Make = “Heffmann”

  (max 5 marks, 1 for correct SELECT statement(ignore additional fields), 1 for correct FROMstatement, 1 each for correct WHERE statementsconnected by ANDs, –1 for each missing AND)

b)  INSERT INTO Bike

  VALUES (‘MG0013’,’MuddyGoat’,’Animal’,2015)

  (max 2 marks, 1 for correct table on insert line,1 for correct data and format on values line)

c)  Using record locks a lock is put on the dataitem so no other user can save to that locationuntil the lock is removed. Serialisation willonly allow transactions to take place one at atime. (max 4 marks, 1 for name of methodologyand 1 for expansion of each; other methodologiesallowed and should be marked accordingly)

Chapter 45

1  Big data is datasets that are either too largeor too complex to be handled using traditionaldatabase techniques. (max 3 marks, 1 for eachunderlined section)

2 a)  The company may struggle to store such largeamounts of data. Due to the structure (or lackof), the company may struggle to analyse thedata effectively. The company may well needspecialised software to manage and extractmeaningful information from the data. (Max3 marks, 1 for each underlined section or otherrelevant problems)

b)  One methodology the company may employ isto make use of a super-computer to performhuge amounts of processing. They may chooseto use a large dedicated network to share theload across multiple machines, and employdistributed processing. They may use functionalprogramming to allow different processors to

work on different aspects of the data at the sametime. (max 3 marks, 1 for each underlined sectionor other relevant solutions)

Chapter 46

1  A functional programming language is onewhich has each line of code made up of calls to afunction which may be made up of other functionsor result in a value. (max 2 marks, 1 for eachunderlined section)

2  A first class object is an object which can be

passed as an argument or returned by a function.A higher order function can accept anotherfunction as an argument. (max 2 marks, 1 foreach underlined section)

Chapter 47

1  [2,6,10,14] (max 1 mark for correct answer)

2  [32,32,31,212] (max 2 marks, 1 mark for includingcorrect answers, 1 mark for not including anythingincorrect)

3  24 (max 1 mark for correct answer)

Chapter 48

1 a)  During analysis it is important to fully analysethe problem, gather information and performa feasibility study to see if the system canrealistically be put in to place. (max 3 marks,1 for each underlined section or other reasonable points/expansions)

b)  During the design stage, the algorithms, dataand interface are designed and checked with

the client. (max 3 marks, 1 for each underlinedsection or other reasonable points/expansions)

c)  During the implementation stage, the actualcode and data structures are created. Thismay involve the production of prototypes forchecking. (max 3 marks, 1 for each underlinedsection or other reasonable points/expansions)

d)  During the testing stage, the system is testedboth as modules and as a full system withnormal, boundary and erroneous data. (max3 marks, 1 for each underlined section or otherreasonable points/expansions)

Page 18: 9781471865824-Answers-final

8/16/2019 9781471865824-Answers-final

http://slidepdf.com/reader/full/9781471865824-answers-final 18/18

18

   N   o  w    t   e

   s   t  y   o  u   r   s   e   l   f   a   n   s  w   e   r   s

E ti t th i i b tt k/ i i t

e)  During the evaluation stage the system is judged according to certain success criteriathat were developed in the specification toensure it is fit for purpose. (max 3 marks,1 for each underlined section or other reasonable points/expansions)

2  During black box testing you only see the input

and output, not what is happening inside thesubroutine(s). During white box testing, the testerlooks inside the subroutine(s) and checks all thepathways through the code. Unit testing makessure each unit carries out the function it has beendesigned for and incorporates both black boxand white box testing. (max 3 marks, 1 for eachunderlined section)

3  Normal data is data that should be enteredinto the program to produce a required result.Boundary data is just on, above, or below thelimit of what is and is not acceptable for theprogram. Erroneous data is data that should notbe entered into the program (it is “wrong”) butcould inadvertently be entered. (max 3 marks,

1 for each underlined section)4  A data flow diagram is a visual representation

of how data are moved around a system.(max 2 marks, 1 for each underlined section)