CS FINAL EXAM

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

1/149

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:38 AM on 1/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

150 Terms

1
New cards

Bit

A single 1 or 0

2
New cards

Binary

Number system which has only two values for each digit

3
New cards

Denary

Number system which used 10 values for each digit

4
New cards

Hexadecimal

Number system which uses 16 values for each digit

5
New cards

MSB

Most significant bit, the bit with the largest value

6
New cards

Overflow

Answer is larger than the number of bits we started with. This produces an error / wrong answer.

7
New cards

Hexadecimal to denary

Convert the digit to denary. Multiply the first number by 16 and add the second number. 4A = 16×4 + 10

8
New cards

Left shift

0011 « 2 = 1100

Can be used to double numbers.

1 left shift = 2×

2 left shift = 4×

3 left shift = 8x

9
New cards

Arithmetic shift

It will preserve the MSB

11001010 » 2 = 11110010

10
New cards

Unsigned number

Positive binary number. Starts with 0

11
New cards

Signed number

Signed number is a negative binary number. Begins with a 1

12
New cards

Sign and magnitude examples

Positive: 01101010

Negative: 11101010

13
New cards

Character encoding

Process of assigning each character a denary number.

14
New cards

Character set

List of all characters recognised by a computer. Includes letters, numbers, symbols and space

15
New cards

ASCII

American standard code. Uses 7 bits to store each character. So it can represent 128 different characters. Only enough for English.

16
New cards

UNICODE

Uses 16 bits (2 bytes) to store each character. It can represent 65536 different characters. This is enough for all languages.

17
New cards

Storing images

Images are made up of pixels. Images have a width and height which makes up the image resolution. Image resolution is number of pixels in an image. Number of bits used for each pixel is colour depth.

18
New cards

Colour depth

Measured in bits. The more bits, the more colours. 2 bit (2²) can store 4 images. Different colours in an image will have different bit patterns. Quality of image will increase the more bits used for colour depth. This also increases file size.

19
New cards

Metadata

Data stored with an image which is needed to reconstruct the image. Image resolution, colour deoth, author, location and file types are examples.

20
New cards

Calculating file size

file size (bits) = width × height × colour depth

Then you have to divide by 8 to get it into bytes. Height × width is resolution.

21
New cards

Analogue

Sound waves are continues → analogue. This cannot be stored digitally so sound must be sampled to be stored digitally. A sample is when the amplitude (height) of a sound is recorded.

22
New cards

Sample rate

How often a sample is recorded. Measured in Hz. The more you sample the more detail so higher quality + increases file size.

23
New cards

Bit depth

This is the number of bits used to record each sample. A higher bit depth means more bits are used per sample which enabled height of wave to be accurately measured. So sampling closer so quality will be better.

24
New cards

Sample interval

Length of time between each sample. Usually fractions of a second. If we have lower sample interval then there is less time between each sample which means better sound quality.

25
New cards

Calculating file size for sound

Bit depth × sample rate × duration

Duration = 20 seconds

Bit depth = 16 bits

Sample rate = 100

20 × 100 × 16 = 32000 bits

32000 / 8 = 4000 bytes

4000/1000 = 4kB

26
New cards

Labelling a sound graph

X axis is time. Y axis is amplitude. Sample interval is between the peak of the wave. Sampling frequency is between the top wave

27
New cards

Sequential

Process unfold in a linear matter. First instruction must be run before second one can run.

28
New cards

Parallel model

Instructions are distributed across two or more processing units. This allows multiple instructions to be run at one time as each instruction is run on an individual processing unit.

29
New cards

Multi agent model

Multiple agents (can be programs, robots, systems) work together, each with their own goals knowledge and actions. They cooperate with eachother to achieve individual or shared objectives. Focuses on coordination and decision making forming basis of AI.

30
New cards

CPU

Connects to other parts of the computer using busses. Runs the instructions of your programs. Only understands binary. Instructions need to be fetched into the CPU from RAM one at a time. Uses FDE for fetching instructions.

31
New cards

Memory address

Integer value which is location within memory where data or instruction can be found.

32
New cards

ALU

Arithmetic login unit. Responsible for running maths and logic instructions (and / or / not). Uses and stores results using the ACC accumulator register

33
New cards

CU

Control unit. Responsible for managing the execution of instructions. It sends control signals to other parts of the computer. Controls timing of instructions

34
New cards

Registers

Located in CPU. Store temporary values used during the execution of instructions. Run at the same speed as CPU.

35
New cards

Data bus

Data can travel both ways. Transports data to and from CPU.

36
New cards

Control bus

Data can travel both ways. Carries control signal to and from CPU.

37
New cards

Address bus

Unidirectional. Transports memory address from CPU to RAM in order to locate a specific data / instruction. Used in fetch in FDE

38
New cards

Von Neumann architecture

One CPU, RAM, storage device, input/output device. RAM will contain both instructions and data such as applications and files.

39
New cards

FDE cycle

Fetch: instructions are fetched from RAM into the CPU one at a time.

Decode: The type of instructions is determined.

Execute: The instructions is run.

Each clock cycle will run one FDE cycle

40
New cards

What affects CPU performance

Clock speed, cache, cores

41
New cards

Clock speed

CPUs use FDE cycle when executing instructions. Number of clock cycles a CPU can do per second. Measured as frequency (GHz). The higher the clock speed the more instructions per second

42
New cards

Cache

Had a higher data transfer rate than RAM. Smaller than RAM. Stores frequently accessed data and instructions. Makes FDE faster because reduces time taken to fetch data. If data not in cache then it takes longer to fetch because we have to search cache and then RAM.

43
New cards

Cores

Two cores run two instructions at once. Each application can run on a separate core so having multiple cores mean that applications can be run at same time. But not all applications can be sped up by having multiple cores. To take advantage of multiple cores it must be broken down.

44
New cards

RAM purpose

Used for temporary data and files currently in use. Faster data transfer than storage. Used to speed up overall performance of computing system. Apps and files are always loaded into RAM before being used.

45
New cards

RAM key properties

RAM is volatile - all data is lost when the power is switched off. It can be read and written. Stores less data than storage device (4Gb → 16Gb)

46
New cards

ROM purpose

Used for storing critical system software needed for running system. Stores BIOS (basic input and output system). Also stores bootstrap. This software is used during start up of computer and located the OS on storage

47
New cards

ROM key properties

Non volatile - all data remains when power is switched off. Only read. Size of ROM is limited only big enough to store bootstrap and BIOS. does NOT store the OS

48
New cards

What is RAM and ROM measured in

Bytes

49
New cards

Units of measurement

1 bit = 1 or 0

1 byte = 8 bits

1 kilobytes = 1000 bytes

1 megabytes = 1000kB

1 gigabyte = 1000Mb

50
New cards

Virtual memory

Used as an extension to RAM, used when RAM is full. A program is moved out of RAM and into secondary storage so part of RAM is freed up for new program / data.

Secondary storage is slower than RAM, overuse of virtual memory will result in decrease in system performance (thrashing)

51
New cards

Slow to fast (cpu, RAM, storage)

Storage, RAM, CPU

52
New cards

Secondary storage

Stores data permanently, stores user files, applications, and operating system. Non volatile, can be read and written. Slower than RAM cuz files are loaded from storage to RAM to be processed

53
New cards

Magnetic

Uses magnetic flux to store data on spinning disks. Used in desktop computers and servers for high capacity storage. Has the largest capacity (Tb). Very reliable. Durability is good when disk not spinning. Mid transfer rate.

54
New cards

Optical

Has 2 parts. Disks which store data and the drives which read the disks. Uses lasers to read data off the disk. Mostly read only. Commonly used to distribute apps games or media like music. Smallest capacity, slowest transfer speed, cheapest, durability is low but is portable.

55
New cards

Solid state

Uses electronic switches to save data commonly used in portable devices. Can also be found in high end laptops, such ad memory sticks. Large capacity. Fastest data transfer. Very reliable, portable and durable

56
New cards

Graphic interface

Makes use of windows, icons, pointers and menus (WIMP). Provides code that allows apps to interact with user using WIMP. Mainly aimed at average user and easy to use

57
New cards

Command line interface (CLI)

Text based interface only. Commands must be known and options so harder to use. Commands give greater control over computer. Mainly used by administrators and technical experts.

58
New cards

Memory management

RAM must be shared amongst all running apps. OS will allocate each app a section of RAM to use. Virtual memory managed by OS.

59
New cards

Multitasking

Illusion apps are running simultaneously but are running sequentially

60
New cards

Processor management

OS decides which process gets CPU access and in which order they run. When waiting it’s held by queue. OS will decide which process is run and how long before it’s added back to queue

61
New cards

Peripheral management

Devices are external from PC. OS manages communication between CPU and devices using device drivers.

62
New cards

Device drivers

Device drivers translate messages to and from hardware so OS will understand. Allowing OS to communicate with a variety of different devices

63
New cards

User management

Allowing users to log in and out the system. Each user has a user area; an area of storage that can only bring accessed by them. Users are grouped together and given different levels of access known as access rights. This includes what files can be accessed and other resources.

64
New cards

File management

Controlling access to files using a file Explorer. Allows files to be opened deleted moved copied created etc. Implements access rights

65
New cards

Utility software

OS contains many small applications → utilities. This is a program that allows the system to be used and maintained.

66
New cards

Sources code

Code the developer writes

67
New cards

High level programming

Sources code is human readable but not for CPU. So must be translated to machine code. High level programming languages are human readable and muh easier to program in like python.

Web development, desktop and mobile apps, game development

68
New cards

High level advantages and disadvantages

Easier to read and write, easier to debug, machine independent so can be used on any computer regardless of architecture

User cannot directly manipulate hardware, slower to process instructions, needs to be translated into machine code before running.

69
New cards

Low level languages

Commonly machine code. Written in binary. Can only understand and execute machine code instructions. Coders use assembly code. Assembly code gives each instruction a mnemonic representation. Used when performance and direct hardware control is crucial.

Writing software, developing core components, programming microcontroller

70
New cards

Low level advantages and disadvantages

Complete control over the system components, uses less memory and instructions can be processed faster, allows direct manipulation of hardware

Difficult to write and understand, machine CPU dependent, knowledge of computer architecture is key to code effectively

71
New cards

Translator instruction set

List of all possible instructions that a particular CPU knows how to execute

72
New cards

Translator

Converts source code into machine code. So converted to binary so CPU understands.

Assembler, compiles and interpreters

73
New cards

Assembler

Translates low level assembly code into machine code. Only needs to be assembled once. Each assembly instruction maps to a single machine code instruction.

Errors are only shown at end. Once compiled source code is no longer needed. Most apps you download will be compiled.

74
New cards

Compiler

Protects source code, compilation is slow but machine code is executed fast. Optimises code during compilations. Easy to debug cuz translates line by line. Translated code us not saved

Compiled programs will only run on one type of computer. Compiled programs are harder to debug. If any changes to source code then it must be re compiled again an can be memory intensive.

75
New cards

Interpreter

One programs can be run on different types of computers. Code is easier to debug and will stop on exact line of code at fault. Requires less RAM to process code.

Runs slower than compiled code because each line is translated before run. Source code may be viewable.

76
New cards

Robust program

Program that anticipates all possible expected and unexpected actions that a user may take and so will not crash. 3 ways of robust programs are validation, verification, code quality.

77
New cards

Verification

Double checks data is typed in correctly.

78
New cards

Ways to improve code quality

Meaningful variable names, using functions, validating user input, adding comments

79
New cards

Vulnerability

Weakness in a computer program. Important to identify these weakness in order to prevent hackers from exploiting a system.

80
New cards

Audit trails

When programs run it often creates an audit trail of actions that have been carried out.

Eg: username that is running code, time and error occurred, any error codes or transaction results, files and networks accessed

81
New cards

Code reviews

A code review allows another programmer to check over code. Allows second person to consider if there are any security problems, suggest better methods or algorithms that could be used, suggest ways that make code easier to understand.

82
New cards

Trace tables

Used to record variable changes as code rins. Commonly used to help debugging.

How to complete:

Read code line by line

When assignment is seen write new value

Print is seen so record output

83
New cards

Explain the effect of changing the MSB of the first binary number.

Overflow error because not enough available bits

84
New cards

Explain why hexadecimal notation is used

Hexadecimal uses fewer digits so it’s easier for humans to remember.

85
New cards

One benefit and one drawback from increasing bit depth audio

B: it increased the accuracy of representation. DB: it takes longer to download and file size increases.

86
New cards

How does a career cipher work?

The positions of letters in the alphabet are shifted positions based on the key.

87
New cards

Explain why data on networks are encrypted

To prevent unauthorised access so data remains confidential making it unintelligible because it is scrambled.

88
New cards

Converting binary to twos complement

Flip the bits and then add 1

89
New cards

Explain the effect of an addition which adds up to 9 bits

An overflow error happens because there aren’t enough bits to store the result.

90
New cards

expression to show the number of bytes

(table h × table w + bit integers) / 8 + 1024

91
New cards

complete the expression to show temperature minimum file size for image in KiB

(colour bit depth × pixel width × pixel height) / (1024 × 8)

92
New cards

Compression

Compressing files allow the file size to decrease and decreases time needed for data to be sent (bandwidth). Lossy permanently removes data whereas lossless data is lost and can be restored.

93
New cards

Lossy

Type of compression which permanently removes data. The advantage is that it’s easier for you to store and transfer images. Disadvantage is your data cannot be restored. JPEG & MP3

94
New cards

Lossless

Type of compression which temporarily removes data which can be restored. Advantage is that the data can be restored and no loss of quality. The disadvantage is that it’s file size reduction is less than the lossy reduction. PNG

95
New cards
96
New cards

Pigpen

The Pigpen cipher is a substitution cipher where each letter of the alphabet is replaced by a symbol derived from a grid. It is used for encryption by substituting each letter with a specific symbol from the grid, making the message unreadable without the key.

97
New cards

Vigenere

The Vigenère cipher is a method of encrypting text by shifting each letter in the message based on a keyword. Each letter of the keyword tells you how many positions to shift the corresponding letter in the message.

98
New cards

Rail fence

The Rail Fence cipher is a transposition cipher that writes the message in a zigzag pattern across multiple "rails" (rows) and then reads off the message row by row. The number of rails determines how the letters are arranged and scrambled.

99
New cards

Run length coding

Run-Length Encoding (RLE) is a simple compression technique that replaces consecutive repeated characters (or "runs") in a string with a single character and a count of how many times it repeats. For example, the string "AAAABBBCCDAA" would be encoded as "4A3B2C1D2A."

100
New cards

ASCII vs Unicode

ASCII, 7 bits to represent 128. Can only represent English.

Unicode, can represent every language and symbol.