CS - Paper 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/199

Last updated 10:04 AM on 4/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

200 Terms

1
New cards

Natural numbers

  • all positive integers, including 0

  • symbol → N

  • used for counting

2
New cards

Integer numbers

  • all positive and negative integers

  • symbol → Z

3
New cards

Rational numbers

  • set of numbers that can be written as fractions

  • symbol → Q

4
New cards

Irrational numbers

  • set of numbers that cannot be written as a fraction

  • e.g. root 2 or pi

5
New cards

Real numbers

  • set of all possible real world quantities

  • symbol → R

  • used for measurement

6
New cards

Ordinal numbers

  • when objects are placed in an order

  • e.g. 1st, 2nd, 3rd

7
New cards

Number bases

  • decimal → base 10, subscript 6710

  • binary → base 2, subscript 100110112

  • hexadecimal → base 16, subscript AE16

8
New cards

why is hexadecimal used

  • as a shorthand for binary

  • easier for humans to read and error check

  • e.g. colours

9
New cards

bit

  • fundamental unit of information

  • either 0 or 1

10
New cards

byte

8 bits

11
New cards

how many values can be represented by n bits

2n, e.g. 23=8, can represent 8 different values

12
New cards

Kibi

210 → Ki

13
New cards

Mebi

220 → Mi

14
New cards

Gibi

230 → Gi

15
New cards

Tebi

240 → Ti

16
New cards

Kilo

103 → k

17
New cards

Mega

106 → M

18
New cards

Giga

109 → G

19
New cards

Tera

1012 → T

20
New cards

what is signed binary

when the most significant bit is used as a placeholder for sign rather than a value, 0=+ and 1=-

21
New cards

minimum and maximum number of bits for unsigned binary

minimum → 0

maximum → 2n-1

22
New cards

two’s complement

most significant bit represent -2n-1 e.g. 10002=8

range from -2n-1 to 2n-1-1

23
New cards

fixed point binary

  • binary point fixed between a set number of bits

  • e.g. 0000.0000

  • not as precise

  • greater speed of calculation

  • only when data is known to be within a certain range

24
New cards

Floating point binary

  • binary point can float between number of bits

  • mantissa and exponent

  • lower speed of calculation

  • more memory to store mantissa

  • greater precision

  • for greater range of values

25
New cards

mantissa

represents value with decimal after first bit

26
New cards

exponent

represents position of point to convert to actual value

27
New cards

why might fixed/floating point binary be inaccurate

  • for a real number to be represented exactly by the binary number system it must be capable of being represented by a binary fraction in the given number of bits

  • some cannot every be represented exactly, e.g. 0.110

28
New cards

Absolute error

  • difference between the actual number and the binary value

  • e.g. 1/3 accurately would be 0.01(recursively), if rep by 4 bits, 0.0101=5/16, absolute error 16/48-15/48=1/16

29
New cards

Relative error

  • percentage difference between the actual number and binary value

  • using 1/3 and 4 bits = 5/16 divided by 1/3=15/16

30
New cards

Why are floating point numbers normalised

to store a greater range of values, reduces need for repeated binary values

31
New cards

what is normalised binary

  • starts with 10 or 01

  • uses two’s complement floating point binary

32
New cards

how to normalise floating point binary

  1. convert into fixed point

  2. adjust exponent accordingly

  3. if number starts with >one 1, cut them off (will be added when converted)

33
New cards

underflow

  • not enough bits available to represent a number therefore would cut off the least significant bit

  • e.g. 0.00001 with only 5 bits would be 0.0000

34
New cards

overflow

  • significant when using signed binary as if you were to add 127 and 1 using 8 bits, answer would be -128 hence overflow has occurred

35
New cards

differentiation between character code, decimal digit and pure binary representation

Character code representation (like ASCII) treats digits as symbols (e.g. 5 is 53 in ASCII), while pure binary representation directly converts the digit's value (5 becomes 101 in binary)

36
New cards

ASCII

way of representing characters with seven bits; later extended to eight

37
New cards

Unicode

16 to 32 bits, created to represent more languages and symbols, now have more storage

38
New cards

why error check

bits can change erroneously due to interference, need to verify

39
New cards

Parity bits

  • additional bit used to check that the other bits transmitted are likely to be correct, very efficient

  • odd or even parity, used to ensure that total number of 1s in each byte (inc. parity) equals an odd or even number e.g. 01010010 → odd parity

Disadvantage:

  • if there are two 1’s in an even parity, 4 bits being transmitted would not cause error and if error occurs, need to retransmit data

40
New cards

Majority voting

  • data transmitted multiple times, most commonly occurring value taken to be correct

  • corrects error - no need for retransmission but volume of data being transmitted increased(takes longer hence less efficient)

41
New cards

checksum

  • algorithm applied to data to determine checksum, e.g. modulo to return division remainder

  • value appended to original in binary (put on end)

  • recipient removes checksum and applies same algorithm to ensure this matches (efficient when algorithm is not complex)

  • cannot correct the error, must retransmit

42
New cards

check digit

  • type of checksum where only single digit added to transmitted data

  • reduces number of different algorithms that could be used, reduces variety of errors that can be detected - efficient

43
New cards

how can bit patterns be used to represent images/sound

  • images can be stored using the images height and width in pixels with the colour depth

  • sound can be stored as digital samples of the original sound.

44
New cards

analogue data

  • continuous and has no limits

45
New cards

analogue signal

  • can take any values

  • changes frequency as required

46
New cards

digital data

  • discrete, represents particular values

47
New cards

digital signal

  • takes range of values

  • changes frequency at specific intervals

48
New cards

ADC

Analogue to Digital Converter

  • samples the data (takes readings at regular intervals and records frequency)

  • frequency → no. samples/second, increased better but uses more space as increased number of bits

  • used with analogue sensors

    • e.g. temperature sensors or microphones

49
New cards

DAC

Digital to Analogue Converter

  • reads bit pattern representation of analogue signal and outputs alternating, analogue, electrical current

  • mostly for audio, e.g. speakers

50
New cards

How are bitmaps represented

image broken into pixels, each of which have a binary value assigned

51
New cards

resolution

number of dots per inch, where a dot is a pixel

52
New cards

colour depth

number of bits stored for each pixel

53
New cards

size in pixels

width of image in pixels x height of image in pixels

54
New cards

storage requirements for bitmapped images ignoring metadata

storage requirements = size in pixels x colour depth

55
New cards

typical metadata

  • width

  • height

  • colour depth

  • date created

56
New cards

how vector graphics represent images

  • uses list of objects containing the properties of each geometric object/shape

57
New cards

typical vector properties of objects, e.g. rectangle

  • width

  • height

  • position

  • fill

    • colour

58
New cards

Vector graphics evaluation

  • scaled without loss of quality

  • better for simple images but worse for photographs

  • less storage space

59
New cards

bitmapped graphics evaluation

  • enlargement = blurry

  • better for photographs

  • information stored for each pixel hence more storage space

60
New cards

sample resolution

  • number of bits per sample

  • higher sample resolution = higher audio quality = greater file size

61
New cards

sample rate

number of samples per second

62
New cards

Nyquist Theorem

sample rate must be at least twice the frequency of the sound or it is not accurately represented

63
New cards

calculate sound sample sizes in bytes

duration of sample x rate x resolution

64
New cards

describe the purpose of MIDI and its use of event messages

  • used with electronic musical instruments connected to computers stores sound in event messages

  • event messages can hold duration of note, instrument note is played by, volume, if sustained, etc.

65
New cards

Advantages of using MIDI files to represent music

  • easy manipulation without loss of quality (instrument can be changed)

  • often smaller file size and lossless

  • cant be used for storing speech

  • often less realistic

66
New cards

why are files often compressed

to reduce file size, hence can be transferred faster

67
New cards

Lossy compression

  • some information lost

  • can reduce resolution, e.g. image or audio, as extent of reduction unlimited

68
New cards

Lossless compression

  • no information lost

  • e.g. run length encoding and dictionary based methods

69
New cards

Run Length Encoding

removing repeated information and replacing with one occurrence followed by number of times repeated

e.g. pixels of same colour

70
New cards

dictionary-based methods

dictionary containing repeated data is appended to the file

e.g. for ‘keep calm keep happy’ could be 1213, with ‘keep’ value having a key of 1

71
New cards

encryption

process of scrambling data so it cannot be understood if cannot be understood if intercepted (secure during transmission)

72
New cards

what is needed to decrypt

  • method

  • key used

73
New cards

ciphertext

encrypted information

74
New cards

plaintext

unencrypted information

75
New cards

Caesar cipher vs Vernam cipher

Caesar → imperfect

Vernam → perfect

opposite extremes of ciphers that are computationally secure

76
New cards

Caesar ciphers

  • by replacing characters, cipher kept constant

Shift ciphers:

  • each letter shifted by same amount (key) in the alphabet

Substitution cipher

  • letters randomly replaced, a little harder to crack, usually based on frequency/logic

77
New cards

The vernam cipher

  • key is chosen uniformly at random

  • ciphertext distributed uniformly

  • key only used one → one-time pad

  • mathematically proven to be completely secure

78
New cards

Vernam cipher - method

  1. align characters of plaintext and key

  2. convert character to binary

  3. apply XOR to the two bit patterns

  4. convert back to character

79
New cards

Vernam ciphers vs ciphers that depend on computational security

in theory, every cryptographic algorithm except for vernam cipher can be broken, given enough ciphertext and time

80
New cards

hardware

physical components (e.g. hard drive, printer, speaker)

81
New cards

software

sequency of instructions which are executed to perform a task - program code

82
New cards

system software

operates, controls, and maintains the computer and its components

  • operating system, utility programs, library, programs, translators

83
New cards

application software

programs that complete specific tasks for the user (e.g. word processor)

84
New cards

operating system

  • handles resource management, managing hardware to allocate processors, memories, I/O devices among competing processes, and interrupts

  • to hide the complexities of the hardware

85
New cards

utility programs

housekeeping tasks:

  • backup

  • defragmenting hard drives

  • compression

  • encryption

86
New cards

libraries

contain useful functions frequently used by programs to simplify process

imported into the program

87
New cards

translators

  • translate different types of languages to machine code

  • e.g. assemblers, compilers, interpreters

88
New cards

low-level languages

specific to the type of processor

e.g. machine code and assembly language

89
New cards

machine code

binary

  • very long and difficult to understand and debug - prone to errors

  • direct, not constrained, better for embedded and real-time applications

90
New cards

machine code

mnemonics

  • more compact, less error prone

  • one to one relation with machine code

91
New cards

high level languages

include imperative high-level language

  • not platform specific but needs to be translated by compiler/interpreter before execution

  • use English instructions and mathematical symbols

  • easier to understand, learn, and debug as it uses named variables and indentation

  • built in functions to save time

92
New cards

imperative high level languages

formed from instructions that specify how computer should complete task

declarative description - what

93
New cards

assembler

translates assembly language to machine code

they have a 1:1 relationship so translation quick but platform specific

94
New cards

compilers

high level → machine code (platform specific)

high level taken as source code, checked for errors and code translated at one if no error is detected

once translated, can be run without any other software

95
New cards

interpreter

  • high level to machine, line by line

  • procedures that can be used to interpret each kind of program instruction

  • checks for errors as it goes (can be partially translated until error reached)

  • both source and interpreter must be present (poor protection of source)

96
New cards

why is intermediate language (bytecode) produced as the final output by some compilers

Source code (only translated once so it can be executed on a variety of processors) → immediate (often bytecode) →machine code

allows platform independence as it uses a virtual machine to execute on different processors

97
New cards

source code

input to translators

98
New cards

object code

output from translator

99
New cards

logic gates - NOT

NOT(1) = 0

<p>NOT(1) = 0</p>
100
New cards

Logic gates - AND

1 AND 0 = 0

1 AND 1 = 1

<p>1 AND 0 = 0</p><p>1 AND 1 = 1</p>