Computer Science Summer Mock

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

1/134

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

135 Terms

1
New cards

explain the term algorithm

a sequence of steps that can be followed to complete a task

2
New cards

explain the term decomposition

breaking a problem into a number of sub-problems which might itself be further subdivided

3
New cards

explain the term abstraction

the process of removing unnecessary detail from a problem

4
New cards

Describe the steps a linear search would follow

  • Starting with the first value

  • Checking all values in order

5
New cards

Describe the steps a binary search will follow to look for a number in a sorted list

  • Select middle number (or left of middle as even number)

  • check if selected number matches target number

  • if searched number is larger, discard left half // if searched number is smaller, discard right half

  • Repeat until number found or remaining list is of size 1 (number not found)

6
New cards

For Binary Search numbers must be ….

ordered

7
New cards

Linear Search is better … (compared to binary search)

Faster on small datasets and simple to understand

8
New cards

Linear Search is worse… (compared to binary search)

Slower on larger datasets and less efficient

9
New cards

Binary Search is better … (compared to linear search)

Faster on large datasets and more efficient.

10
New cards

Binary Search is worse… (compared to linear search)

Data must be in order and more complex to implement

11
New cards

merge sort is…

a sorting algorithm that divides a dataset into smaller sub-datasets and merges them back together in the correct order

12
New cards

bubble sort is…

a simple sorting algorithm that starts at the beginning of a dataset and checks values in 'pairs' and swaps them if they are not in the correct order

13
New cards

Merge sort is better… (compared to bubble sort)

Suitable for large datasets and performs well even on very unorganised data

14
New cards

Merge sort is worse… (compared to bubble sort)

Uses lots of memory and more complex to implement

15
New cards

Bubble sort is better… (compared to merge sort)

Simple to understand and implement

16
New cards

Bubble sort is worse… (compared to merge sort)

Slow for large datasets and inefficient

17
New cards

count controlled iteration code

for loops

18
New cards

condition controlled iteration code

while loops

19
New cards

selection code

if statements

20
New cards

subroutine

procedure or function

21
New cards

// name and meaning

DIV, gives whole integer of division without remainder.

22
New cards

%

MOD, gives remainder of division

23
New cards

equal to

==

24
New cards

not equal to

!=

25
New cards

greater than or equal to

>=

26
New cards

less than or equal to

<=

27
New cards

code to print uppercase, use variable name

print(name.upper())

28
New cards

code to print lowercase, use variable name

print(name.lower())

29
New cards

code to find length, use variable name

len(name)

30
New cards

code to find substring, use variable name find n to m

name[0:2]

31
New cards

concatinate Fname and Sname into variable FullName

FullName = FName + SName

32
New cards

code to convert ASCI letter A to numerical value and print it

print(ord("A"))

33
New cards

code to convert numerical value 97 to ASCII code and print it

print(chr(97))

34
New cards

What is casting?

converting one data type to another

35
New cards

import for random number generation

import random

36
New cards

code for random number generation of 1 to 10 with variable number

number = random.randint(1,10)

37
New cards

Explain the advantages of using subroutines in programs.

  • Avoid duplicating code as they can be reused

  • Improve the readability

38
New cards

What are parameters?

values that are passed into a sub program

39
New cards

What is a syntax error?

  • an error that breaks the grammatical rules of a programming language and stops it from running

40
New cards

What is a logic error?

incorrect code that produces an incorrect output

41
New cards

What base is decimal?

10

42
New cards

What base is binary?

2

43
New cards

What base is hexadecimal?

16

44
New cards

Why do computers use binary?

To represent all data and instructions

45
New cards

Why is hexadecimal often used in computer science?

-Large numbers can be represented in fewer digits

-it is easier for humans to understand, write and check than binary.

46
New cards

How many columns on a nibble table?

4

47
New cards

How many columns on a byte table?

8

48
New cards

What does a small b represent?

bit

49
New cards

What does a big B represent?

byte

50
New cards

What is a bit?

fundamental unit of information

51
New cards

1KB/kilobyte is

1000 bytes.

52
New cards

1MB/megabyte is

1000 kilobytes

53
New cards

1GB/gigabyte is

1000 megabytes

54
New cards

1TB/terabyte is

1000 gigabytes

55
New cards

What is a character set?

A collection of characters that a computer recognises from their binary representation

56
New cards

What is ASCII?

a character set of 7 bit code that can hold 128 characters

57
New cards

What is Unicode?

a character set of 16 bit code that can hold 65,536 characters

58
New cards

Advantage of ASCII over Unicode

Takes up less storage

59
New cards

Advantage of Unicode over ASCII

Has more characters

60
New cards

Unicode uses the same codes as ASCII up to ...

127

61
New cards

What is hardware?

physical components of a computer system that you can touch

62
New cards

What is software?

the programs that control the hardware that cannot be physically touched

63
New cards

What is system software?

software that manages the computer system resources and acts as a platform to run application software

64
New cards

What is application software?

software that performs end-user tasks

65
New cards

2 Examples of application software:

social media application and gaming software

66
New cards

1 Example of system software:

operating systems

67
New cards

operating systems handle management of the:

memory, security and applications

68
New cards

State the purpose of an assembler:

To translate assembly language into machine code

69
New cards

State the purpose of an interpreter:

converts each high-level program statement into machine code and executes it line by line, helping with debugging

70
New cards

State the purpose of a compiler:

convert high-level code into machine code all at once, making programs run faster

71
New cards

Explain the role and operation of main memory

the computer's short-term storage for instructions and data that the CPU needs to access quickly

72
New cards

Explain the role and operation of arithmetic logic unit

performs arithmetic and logical operations and acts as a gateway between primary memory

73
New cards

Explain the role and operation of control unit

manages the execution of instructions by sending control signals to coordinate execution and controls FDE cycles and buses

74
New cards

Explain the role and operation of register

store small amounts of data that are needed during processing

75
New cards

Explain the role and operation of clock

to synchronise the computer's hardware components

76
New cards

Explain the role and operation of bus

a collection of wires through which data is transmitted from one component to another

77
New cards

Explain the effect of the following on the performance of the CPU:clock speed

the faster the clock speed the faster the the FDE cycles and CPU

78
New cards

Explain the effect of the following on the performance of the CPU:number of processor cores

the more cores the fore instructions can be processed in a given time

79
New cards

Explain the effect of the following on the performance of the CPU:cache size

the larger the cashe the less time the processor has to wait for instructions to be fetched

80
New cards

Understand and explain the Fetch-Execute cycle. FETCH

the next instruction is fetched to the CPU from main memory

81
New cards

Understand and explain the Fetch-Execute cycle. DECODE

the instruction is decoded to work out what it is

82
New cards

Understand and explain the Fetch-Execute cycle. EXECUTE

the instruction is executed

83
New cards

RAM

Stores programs and data currently in use

84
New cards

ROM

Stores start-up instructions for the computer

85
New cards

Cache

Stores copies of frequently used instructions to speed up execution

86
New cards

Register

Super fast storage of instructions, data or addresses that the CPU is working on

87
New cards

volatile

memory is cleared whenever the supply of power is lost

88
New cards

non-volatile

memory will continue to hold anything it was storing even if it is not receiving any power

89
New cards

Main memory

any form of memory that is directly accessible by the CPU

90
New cards

Secondary storage

any non-volatile storage mechanism not directly accessible by the CPU

91
New cards

advantages and disadvantages of solid state

portable and durable due to lack of moving parts, high cost

92
New cards

advantages and disadvantages of optical storage

low cost and portable as it is small, low capacity and susceptible to damage

93
New cards

advantages and disadvantages of magnetic storage

high capacity and low cost, data can be corrupted if exposed to strong magnetic fields

94
New cards

Explain the term cloud storage.

long term secondary storage of data that resides in a remote location

95
New cards

advantages and disadvantages of cloud storage

reliable and high capacity, inaccessable without internet and can lead to privacy concerns.

96
New cards

What are embedded systems?

Computers built into other devices

97
New cards

name 2 embedded systems

calculators and phones

98
New cards

name 2 non-embedded systems

computers and dedicated servers

99
New cards

Define what a computer network is.

two or more computers connected together for the purpose of communication

100
New cards

advantages and disadvantages of computer networks

communication can be made easy with emails and users can share files, increased security risk to data and malware can infiltrate the network