32
WORKBOOK ANSWERS OCR AS/A Level Computer Science 1 Computer systems The central processing unit (CPU) 1 To process instructions and data 2 Any three from: (3) Arithmetic and Logic Unit (ALU) Program Counter (PC) Accumulator (ACC) Memory Address Register (MAR) Memory Data Register (MDR) Current Instruction Register (CIR) 3 Data bus, address bus, control bus 4 The cache is memory built into the CPU. It is used to store the most commonly used instructions for quick access. It is often made up of different layers (often three). 5 In the von Neumann architecture instructions and data are stored in the same memory. In the Harvard architecture instructions and data are stored in separate memory.

Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

WORKBOOK ANSWERSOCR AS/A Level Computer Science 1

Computer systemsThe central processing unit (CPU)

1 To process instructions and data

2 Any three from: (3)

Arithmetic and Logic Unit (ALU)

Program Counter (PC)

Accumulator (ACC)

Memory Address Register (MAR)

Memory Data Register (MDR)

Current Instruction Register (CIR)

3 Data bus, address bus, control bus

4 The cache is memory built into the CPU.

It is used to store the most commonly used instructions for quick access.

It is often made up of different layers (often three).

5 In the von Neumann architecture instructions and data are stored in the same memory.

In the Harvard architecture instructions and data are stored in separate memory.

6 It would only process one instruction at a time.

It wouldn't start to fetch the next instruction before it had executed the previous one.

Types of processor

7 Carrying out multiple tasks simultaneously

Page 2: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Computer systems

8 One from: (1)

It improves the performance of the CPU.

It can handle larger amounts of data in a given time.

9 RISC processors have a highly optimised set of instructions that have several tasks condensed into an instruction; (1) CISC processors have separate instructions for each task that the processor can do. (1)

10 In SIMD processing the same operation is performed on multiple data simultaneously; (1) in MIMD processing different operations are performed on different data simultaneously. (1)

11 GPUs use SIMD processing (1) so the GPU can rapidly perform the same algorithm on different data to crack the password. (1)

Input, output, storage and memory

12 Any two from: (2)

RAM is volatile.

RAM stores data and instructions that are currently being processed.

RAM is temporary data storage.

13 Any two from: (2)

ROM is non-volatile.

ROM stores data such as boot-up instructions.

ROM is permanent data storage.

14 It may have larger amounts of storage available.

Data can be accessed from any device that can connect to the virtual storage.

15 Any two differences with explanation from: (2 per difference)

Magnetic storage devices use magnets to record data on rotating magnetic plates. (1) Flash storage devices use positive and negative charges to record data onto cells that are made up of transistors. (1)

Magnetic storage devices are less robust as they have moving parts that can be damaged if bumped or dropped. (1) Flash storage devices are more robust as they do not have any moving parts. (1) Magnetic storage tends to consume more power as it has moving parts. (1) Flash storage tends to consume less power as it does not have any moving parts. (1)

16 Any four from: (4)

A laser is used.

The laser is shone onto the surface of the disk.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 2

Page 3: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Computer systems

The disk is rotated at a constant speed.

The laser is used to burn pits into the surface of the disk.

Data is burned onto the disk in tracks.

Exam-style questions17 Tina could upgrade from a dual core to a quad core processor.

This would double the amount of instructions that could potentially be processed at the same time.

Tina could upgrade from a 2 GHz to a 3 GHz processor.

This would mean that an extra billion instructions could be processed per second.

18 (max 5 marks)

The contents of the PC are sent to the MAR (1) using the address bus. (1)

A signal is sent from the MAR to the address in memory (1) using the address bus. (1)

The contents of the location in memory are sent to the current instruction register (1) using the data bus. (1)

The PC is then incremented. (1)

19 RISC processors are often faster as they have more streamlined sets of instructions (1) which often requires fewer cycles per second to execute. (1)

The instructions in RISC processors can often incorporate several tasks at once (1) increasing the number of tasks that can be carried out at one time. (1)

20 In MIMD processing, different instructions are performed on different data simultaneously.

More than one core must be present for each different instruction and different data set to be executed at the same time.

If it only had one core, only one instruction could be executed at a time.

21 Flash storage has no moving parts, which can make it more robust (1) so if the mobile device was dropped, the storage would be less likely to break. (1)

Flash storage is smaller in size for the same capacity (1) therefore it is more portable for a mobile device. (1)

22 A computer needs ROM to store the boot-up instructions. (1)

It needs ROM to do this otherwise they would be lost each time the computer is turned off. (1)

A computer needs RAM to store programs and data that are currently in use. (1)

A computer needs RAM to do this to make them quick and easy to process. (1)

If the computer did not have RAM, it would need to fetch everything from secondary storage each time (1) which would be much more time consuming for the computer. (1)

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 3

Page 4: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

Software and software developmentSoftware

1 Any four from: (4)

File management

Memory management

Managing peripherals / Managing I/O

Software installation

Security

Providing user interface

Handling interrupts

Managing processor time

Providing a platform to run applications

2 Drivers

3 The computer would not be able to communicate with peripheral devices or run applications.

The computer would not know what to prioritise and what to run.

4 It helps manage the system resources.

It lies below the user interface.

It is used by applications to transmit data to devices.

5 Many possible answers, three examples given below:

Television

Car

ATM

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 4

Page 5: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

6 Real-time

7 Any two from: (2)

Easy to add further resources.

If one computer fails, the others will take on its role.

Can provide a higher level of performance than a single computer.

8 One program would be able to change the data of another program.

A malicious program could access many different programs.

Programs would not be able to share data effectively when required.

9 Paging is when memory is divided into physical units of data that are the same size.

The operating system uses a paging table to keep track of where each page is stored.

Segmentation is when memory is divided into logical units of data that vary in size.

Each segment will normally be a logical grouping of code.

10 A scheduler is a program that manages the time allocated to different processes carried out by the CPU.

It can use various algorithms to manage time allocation.

Examples of these algorithms include round robin, first come first served, shortest job first etc.

11 He could create a virtual machine on his computer (1) and then use the virtual machine to run an Android OS. (1)

Applications generation

12 Any four from: (4)

Antivirus

Compression software

Encryption software

Disk analysis

Auto-updates

Firewall

Back-up software

13 Fragmented pieces of files identified.

The fragments are grouped back together.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 5

Page 6: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

Free space is identified.

Free space is moved to the end of the files.

14 Free to use.

Can personally tailor to your needs.

15 Can be expensive to purchase.

Not able to tailor it much to personal needs.

Software development

16

17 Any two from: (2)

It is a simple development model to manage.

It makes it easy to understand what the responsibilities are for each person involved.

Each phase is completed one at a time, with expected outputs.

18 One from: (1)

A benefit is that there is a high amount of risk analysis takes place, in order to reduce risk.

A benefit is that it can allow for faster development of software.

A benefit is that it allows the designers and creators to gain an ongoing understanding of requirements, during development

A benefit is that customers and end/users can be given the opportunity to provide feedback to aid development.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 6

Page 7: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

Any one from: (1)

A drawback is that the level of risk analysis required needs a high level of expertise.

A drawback is that it can be a complex process to manage due to the number of phases that can be in operation.

19 It is used in the agile development method.

It is a feature of extreme programming.

One programmer will physically type the code.

One programmer will analyse what the other has typed.

20 RAD would be the best method to use.

RAD is most suitable when requirements are not fully known.

RAD would allow for the shortest development time.

RAD reduces development time by using prototyping.

The constant contact with the client will allow feedback to form and change the requirements.

It would only be suitable if the project was small to medium-sized.

Types of programming language

21 It is a method of programming or a particular approach to programming.

22 In procedural programming, we tell the computer the steps we want it to go through to solve the problem.

It is based upon the concept of the procedure call.

A procedure is a subroutine that may be called at any point.

Many modern programming language support procedural programming.

23 A class is a template in which attributes and methods are defined.

24 An object is an instance of a class where attributes are assigned real values.

25 The act of binding data and processes together

26 Any three from: (3)

Attributes

Data types

Methods

Inheritance

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 7

Page 8: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

27 This is an example answer; students may provide other correct answers.

1 mark for suitable properties

1 mark for suitable data types assigned

1 mark for suitable methods

BankAccountAccountNumber : StringCustomerDetails : StringBalance : Currency (or Real)Constructor()getAccountNumber()getCustomerDetails()getBalance()setAccountNumber()setCustomerDetails()setBalance()WithdrawMoney()DepositMoney()

28 This is an example answer; students may provide other correct answers.

1 mark per set of suitable properties for the class (3)

1 mark per set of suitable data types assigned (3)

1 mark per set of suitable methods (3)

1 mark for the inheritance arrows

29 Polymorphism

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 8

Page 9: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

30 RAM

31 Loads a value into the accumulator.

The value will be loaded from a particular address in memory.

32 This is an example answer; students may provide other correct answers.

1 mark for loading and outputting value stored in location B

1 mark for decrementing / incrementing a count

1 mark for looping five times

1 mark for loading and outputting value stored in location A

1 mark for correct structure of address locations

Loop LDA B

OUT B

LDA Count

SUB One

BRP Loop

LDA A

OUT A

HLT

A DAT 10

B DAT 5

Count DAT 4

One DAT 1

Exam-style questions33 Data is separated into pages

Page table is stored in RAM

CPU uses page table to look up page

If CPU looks for page and it is not in RAM

THEN it initiates a page fault

Page fault tells CPU page is in VM and needs to be brought into RAM

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 9

Page 10: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

34 The contents of the PC and other registers are copied into an area of memory (1) that is called a stack. (1)

The relevant interrupt service routine can then be loaded, (1) which is done by changing the PC to the value where the interrupt service routine starts in memory. (1)

When the interrupt service routine is complete, the previous values can be restored (1) from the stack back to the PC and other registers. (1)

35 Luke should use a compiler.

It would create an executable file that he can send that won’t allow access to the source code.

Alice won’t need to recompile the program, she can just run it.

36 Because it translates the code line by line.

It will stop when it gets to an error.

This will make it easier to debug the program.

It will then continue to translate, removing the need to translate the whole program again each time.

37 The compiler goes through a sequence of stages:

lexical analysis to remove comments and white spaces syntax analysis to check that the code follows the rules of the language code generation to convert into object code optimisation to make the code as efficient as possible

The linker will either put all the required library code into the program (static linking) or link the program to them when it is run (dynamic linking).

Banded mark scheme

Description MarksStudent has thorough knowledge of how a program is compiled. Student has fully explained each of the stages of compilation. Student explains how libraries are linked.

7–9

Student has reasonable knowledge of how a program is compiled. Student has outlined all of the stages of compilation. Student has little mention of how libraries are linked.

4–6

Student has basic knowledge of how a program is compiled. Student may have outlined some of the stages of compilation. Student has no mention of how libraries are linked.

1–3

No marks for any response not worth crediting. 0

38 Agile software development methods cope with changing requirements through producing the software in an iterative manner. Each version of the software builds on the previous version. Users can change the requirements at each stage, so agile programming is suitable for complex projects where the requirements may change.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 10

Page 11: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

The waterfall lifecycle has a number of distinct stages: determination of requirements, analysis, design, coding, testing, implementation, maintenance. Each stage has its own output(s) and is completed before the next stage starts. It is suitable for projects in which the requirements are very clearly understood.

The change from the waterfall lifecycle to agile programming has occurred because in agile programming the software can be adapted as the requirements change. The user sees the program at different stages of development and so gets a clearer idea of what they require the program to do.

Banded mark scheme

Description MarksStudent has given a thorough description of both software development methods. Student has provided at least two fully described reasons why the change has been made from one method to another.

7–9

Student has given a reasonable description of both software development methods. Student has provided at least one fully described reason why the change has been made from one method to another.

4–6

Student has given a basic description of both software development methods. Student has provided little analysis about why the change has been made from one method to another.

1–3

No marks for any response not worth crediting. 0

39 Declarative programming is when we describe the results that we want the solution to have.

SQL is an example of declarative programming.

Imperative programming is based on the notion of giving the computer orders.

These orders are designed to produce a desired result.

Procedural and object-oriented are examples of imperative programming.

40 INP

STA Num

NextGuess INP

SUB Num

BRZ Correct

LDA Count

SUB One

BRP NextGuess

BRA NotCorrect

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 11

Page 12: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Software and software development

Correct LDA One

OUT

BRA End

NotCorrect LDA Zero

OUT

End HLT

Num DAT

Count DAT 4

One DAT 1

Zero DAT 0

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 12

Page 13: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

Exchanging dataCompression

1 Reducing the size of a file

2 Lossy

Lossless

3 In lossy compression some of the data is permanently removed from the file.

If data is permanently removed from a data file, it may no longer make sense.

4 a (3)

1E1v1e1r1y1[space]1d1a1y1, 1i1n1[space]1e1v1e1r1y 1w1a1y1, 1[space]1I1[space]1a1m1[space]1g1e2t1i1n1g1[space]1b1e2t1e1r1[space]1a1n1d1[space]1b1e2t1e1r

b (3)

Character PositionE 1v 2, 16e 3, 15, 17, 32, 40, 43, 51, 54r 4, 18, 44, 55y 5, 9, 19, 23d 7, 48a 8, 22, 28, 46i 12, 35n 13, 36, 47w 21I 26m 29g 31, 37t 33, 34, 41, 42, 52, 53b 39, 50, 10, 24[space] 6, 11, 14, 20, 25, 27, 30, 38, 45, 49

c The dictionary method would be better.

There are not many repetitions in a row of letters, only the double ts.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 13

Page 14: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

This means that run length will not reduce the file size much.

There are a number of repetitions with letters in general, so these can be recorded more efficiently in a dictionary.

Encryption and hashing

5 An algorithm used to scramble data

6 One from: (1)

A hashing algorithm

A means of encrypting information that cannot be decrypted

7 The number of bits used for the encryption key could be increased.

It could be split to require two keys, a public and a private key.

8 Data that is encrypted can be decrypted again to be read, so it is a two-way process.

Data that is hashed cannot be unscrambled, so it is a one-way process.

Databases

9 A database that contains a single table

10 It is a unique field.

It is a unique way of identifying each record in a database.

11 To link two tables together

12 Database will search through each record in turn.

It will stop when it finds the required record.

13 Removing redundant data from the database

14 a (3)

Booking ID

Artist/Band

Email Contact No.

Booking Date

Venue Name

Address Line 1

Town Postcode Fee Manager/Agent

001 PopRUs

[email protected]

07777777771

01/01/2019

The Arena

Play St London LN1 1LN 2000 Mandy’s Music

002 Play That Guitar

[email protected]

07777777772

02/01/2019

The Hall Sing St Manchester M1 1MM 3500 Jenna Jackson

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 14

Page 15: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

003 Jonesy Jones

[email protected]

07777777773

02/01/2019

The Arena

Play St London LN1 1LN 3000 Jenna Jackson

004 The Sing Songers

[email protected]

07777777774

03/01/2019

The Academy

Guitar St Birmingham

B1 1BB 2500 Billy Bob

005 Up The Charts

[email protected]

07777777775

03/01/2019

The Hall Sing St Manchester M1 1MM 2500 StarsRUs

006 ThrashOut

[email protected]

07777777776

04/01/2019

The Arena

Play St London LN1 1LN 2000 Billy Bob

007 Jonesy Jones

[email protected]

07777777773

05/01/2019

The Hall Sing St Manchester M1 1MM 2500 Jenna Jackson

008 PopRUs

[email protected]

07777777771

05/01/2019

The Academy

Guitar St Birmingham

B1 1BB 2500 Mandy’s Music

009 Up The Charts

[email protected]

07777777775

06/01/2019

The Academy

Guitar St Birmingham

B1 1BB 3000 StarsRUs

b (5)

Booking ID

Artist ID Booking Date Venue ID Fee

001 A01 01/01/2019 V01 2000002 A02 02/01/2019 V02 3500003 A03 02/01/2019 V01 3000004 A04 03/01/2019 V03 2500005 A05 03/01/2019 V02 2500006 A06 04/01/2019 V01 2000007 A03 05/01/2019 V02 2500008 A01 05/01/2019 V03 2500009 A05 06/01/2019 V03 3000

Artist ID

Artist Manager Email Contact

A01 PopRUs Mandy’s Music [email protected] 07777777771A02 Play That Guitar Jenna Jackson [email protected] 07777777772A03 Jonesy Jones Jenna Jackson [email protected] 07777777773A04 The Sing Songers Billy Bob [email protected] 07777777774A05 Up The Charts StarsRUs [email protected] 07777777775A06 ThrashOut Billy Bob [email protected] 07777777776

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 15

Page 16: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

Venue ID

Venue Address Line 1 Town Postcode

V01 The Arena Play St London LN1 1LNV02 The Hall Sing St Manchester M1 1MMV03 The Academy Guitar St, Birmingham B1 1BB

c As 2nd form but Manager does not depend on artist, so manager table created. (2)

Manager ID ManagerM01 Mandy’s MusicM02 Jenna JacksonM03 Billy BobM04 StarsRUs

Artist ID Artist Manager ID Email ContactA01 PopRUs M01 [email protected] 07777777771A02 Play That Guitar M02 [email protected] 07777777772A03 Jonesy Jones M02 [email protected] 07777777773A04 The Sing Songers M03 [email protected] 07777777774A05 Up The Charts M04 [email protected] 07777777775A06 ThrashOut M03 [email protected] 07777777776

Networks

15 Multiple computers or devices that are connected

16 A set of rules that govern communication when using a network

17

18 In a client–server network there are two types of devices: clients that are the computers and a central server.

Each client is connected to the central server, where processes such as data storage and internet access are carried out.

In a peer-to-peer network there is one type of device: peers that are computers.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 16

Page 17: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

Each peer is connected to the other peers to form a network that peers can use to share resources.

19 The grey lines indicate the route of the data.

20 The arrows show the many possible pathways for each packet.

21 Any three from: (3)

Fibre optic cable

Coaxial cable

Twisted pair cable

Wireless

22 To direct data packets to their required destination.

To connect one network to another network.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 17

Page 18: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

23 The domain name server is an index of website domain names and their corresponding IP addresses.

User types in URL and the web browser sends a request to the domain name server to locate the correct IP address.

The domain name server is only an index of websites; the website data is stored on a webserver.

Once the IP address is located a request is sent to the web server to obtain the website data.

The website data is then sent back to the web browser.

The internet

24

Tag Use

<html> Defines that is an HTML document

<link> Defines the relationship between the document and an external resource, often a style sheet

<title> Defines a title for the document

<body> Defines the main area for the document

<h1><h2><h3> Defines headings

<img> Defines an image

<a> Defines a hyperlink

<div> Defines a section

<form> Defines a form for user input

<input> Defines an input box

<p> Defines a paragraph

<li> Defines a list item

<ol> Defines a ordered list

<ul> Defines an unordered list

<script> Defines a client-side script

25 Defines an ID

26 Defines a class

27 h1 {

font-family: arial;

font-size: 22pt;

color: darkblue;

}

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 18

Page 19: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

p {

background-color: lightblue;

border-style: solid;

border-width: 5px;

border-color: black;

font-family: arial;

font-size: 16pt;

color: black;

}

28 A database where information about web pages is stored after it has been collected, parsed and processed. It is used for quick retrieval of the information.

29 It counts the number of links to a page.

It counts the quality of links to a page.

It uses this information to assume how important a website is.

It works on an underlying assumption that pages that have more links and higher quality links are more important web pages.

Exam-style questions30 Two keys are used.

The keys are called public and private keys.

The public key is publicly known and is used to encrypt the data.

The encrypted data is then transmitted to the receiver.

The public key and private key are then both applied.

Both keys together are used to decrypt the data.

31 a (3)

SELECT Forename FROM Customer WHERE Town = ‘Old Town’

b (3)

SELECT Title, Forename, Surname FROM Customer WHERE Town = ‘New Town’

c (4)

SELECT Title, Surname FROM Customer WHERE Town = ‘Old Town’ AND Order no > 003

32 It can monitor incoming and outgoing traffic. (1)

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 19

Page 20: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Exchanging data

Criteria/rules can be set for data. (1)

If the data doesn’t meet the rules OR if data does meet the rules (1) access is denied OR access is granted. (1)

33 Easy for people on the network to share data.

Allows people to share resources such as printers.

If a computer gets, for example, a virus, it could easily be transmitted to other devices on the network.

34 It establishes and terminates connection between devices.

It uses routers to establish/terminate connections.

It is responsible for a reliable flow of data across a network.

It performs error detection and establishes the speed data is sent.

35 It reduces the load on the server, (1) which will speed up other activities the server is responsible for. (1)

It reduces the amount of web traffic, (1) as data is already checked before being sent to the server, so no erroneous data will need to be returned after sending. (1)

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 20

Page 21: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Data types, data structures and Boolean algebra

Data types, data structures and Boolean algebraData types

1 1100101

2 101000110

3 207

4 717

5 E9

6 6C

7 00011001

8 10001101

9 10011011

10 01011000

11 010011101

12 101011110

13 01110111

14 01110111

15 0.110010101 000111

16 77.75

17 01100001000

18 00001111

19 00010001

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 21

Page 22: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Data types, data structures and Boolean algebra

Data structures

20 studentTestScores = [10,6]

21 studentTestScores = [30,5,3]

22 Two from: (2)

Lists are one-dimensional, arrays can be multi-dimensional.

Lists are dynamic, arrays are static.

Lists are mutable, arrays are immutable.

Lists are generally slower to access, arrays are generally faster to access.

23 They are an immutable list.

They are accessed using an index.

24 25, 36, 75, 33, 29, 27

25 Start of queue

25, 36, 75, 23, 99, 40

End of queue

26 Points from the previous node in the list to the next node in the list

27 Pointer from option A will no longer point to option B.

Pointer from option A will now bypass option B.

Pointer from option A will now set to point to option C, removing option B from list.

28 In depth-first traversal, you visit all nodes attached to a node (1) before visiting a second node attached to a starting node. (1)

In breadth-first traversal, you visit all nodes (1) attached directly to a starting node first. (1)

Boolean algebra

29

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 22

Page 23: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Data types, data structures and Boolean algebra

A C B C ¬ A B

30 A B B C (B C)

A B B C B B C C

A B B B C B C C

A B B C B C

A B B C

A B C

Exam-style questions31 01001101.00 + 0001110.110 = 01011011.110 = 0101101111 000111

32 01100110

33 Stack is Last In First Out.

Queue is First In First Out.

In a queue, start and end pointers track the data items in the queue

34

35

A ¬ B A ¬ C ¬ B C ¬ A C

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 23

Page 24: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Data types, data structures and Boolean algebra

36 B ¬ B (A B) (A C)

¬ B B (A B) (A C)

¬ B A (B B) (A C)

¬ B A B (A C)

A ¬ B B (A C)

A (A C)

C (A A)

C A

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 24

Page 25: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Computer law and ethical, moral and social issues

Computer law and ethical, moral and social issues.Computer law

1 Any two from: (2)

Data should be processed fairly and lawfully.

Data should only be used for the purpose specified.

Data should be relevant and not excessive.

Data should be accurate and up to date.

Data should only be kept for as long as necessary.

Individuals have the right to access data stored about them.

Security must be in place to prevent unauthorised access.

Data may not be transferred outside EU without adequate data protection.

2 Allows certain public bodies the right to intercept communications.

This ranges from an individual’s internet activity to mass surveillance of communications.

Ethical, moral and social issues

3 They allow workers to share resources more easily.

They allow workers to communicate more easily.

They could create distractions for workers.

4 Any five from: (5)

Artificial intelligence refers to computers that are able to perform tasks that are associated with intelligent behaviour.

It is the system's ability to imitate human behaviour.

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 25

Page 26: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Computer law and ethical, moral and social issues

Machines are programmed to learn and reason from tasks they complete.

An example of artificial intelligence, e.g. credit-card checking, speech recognition, medical diagnosis, control systems.

Some people believe they are a risk because they feel they can too easily replace humans in tasks, and ultimately jobs.

Some people believe they are a risk because we do not know the extent to which they are capable of learning, so they fear the unknown.

5 The amount of electricity required to power devices is increasing, (1) which could create more issue with carbon emissions. (1)

The frequency of which we update technology is increasing, (1) which could lead to an increase in landfill issues and pass toxic materials to the soil. (1)

Exam-style questions6 Under the Data Protection Act, data should be processed fairly and lawfully, so the company must

explain to those whose data it is gathering that their details will be used for marketing purposes and sold to global organisations.

Data should only be used for the purpose specified, so the data cannot be used for anything other than marketing.

Data should be accurate and up to date and should only be kept for as long as necessary, so the company may set a time limit on how long the data can be used for.

Individuals have the right to access data stored about them, so the company should provide information on how individuals can obtain this data.

Security must be in place to prevent unauthorised access, so the company must ensure that data is protected.

Data may not be transferred outside EU without adequate data protection, so the company can only sell the data to companies in countries that have adequate legislation.

Banded mark scheme

Description MarksStudent has described all of the relevant principles of the Data Protection Act and has directly related each to an analysis of how the principal affects a company gathering and selling data.

7–9

Student has identified all of the relevant principle of the Data Protection Act.Student has some analysis of how these principles affect companies gathering and selling data. Some opportunities may have been missed.

4–6

Student has identified one or two of the basic principles of the data protection act.Student has little analysis about how the basic principles affect companies gathering and selling data.

1–3

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 26

Page 27: Hodder Education - Educational Resources for Students ... · Web viewUsers can change the requirements at each stage, so agile programming is suitable for complex projects where the

Computer law and ethical, moral and social issues

No marks for any response not worth crediting. 0

7 Censorship of content available on the internet is the deliberate suppression of what can be accessed or published.

Access may be limited by governments or organisations to information that they consider to be socially unacceptable or dangerous.

Some local censorship is carried out by, for example, schools and businesses, to limit access only to acceptable content.

Technical difficulties associated with censoring material on the internet are complex and are usually carried out centrally or by governments instructing internet service providers.

Under human rights legislation, everyone has the right to freedom of expression, i.e. to hold their own opinions and to express them freely.

Some people believe that censorship is necessary to protect individuals from dangerous content.

Some people consider that censorship of content goes against the right to freedom of expression.

Banded mark scheme

Description MarksStudent displays a thorough understanding of what is meant by censorship. At least two advantages and disadvantages of censorship have been described and analysed in relation to human rights. A detailed conclusion has been drawn.

9–11

Student displays a reasonable understanding of what is meant by censorship. At least one advantage and disadvantage of censorship has been described and analysed. A basic conclusion has been drawn.

5–8

Student displays a basic understanding of what is meant by censorship. One advantage and disadvantage of censorship have been identified. No conclusion has been drawn.

1–4

No marks for any response not worth crediting. 0

OCR AS/A level Workbook: Computer Science 1

© Sarah Lawrey 2019 Hodder Education 27