Computer science theory

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/215

flashcard set

Earn XP

Description and Tags

basically everything

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

216 Terms

1
New cards

What happens during fetch?

o The CPU places the address of the next instruction to be fetched in the program counter.
o The memory location is found via a signal sent along the address bus.
o The data at that memory location is copied via the data bus into the instruction register.
o The program counter is incremented so that it points to the next instruction.

2
New cards

Decomposition is...

breaking down a complex problem or system into smaller parts that are more manageable and easier to understand

3
New cards

Abstraction is...

the process of extracting or withdrawing something

4
New cards

Subprograms are beneficial because...

easier to debug and test as they are on their own, can be saved separately and used again in other programs, code can be repeated without having to rewrite it

5
New cards

An algorithm is...

'a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer' - an unambiguous sequence of instructions that can be used to solve a problem

6
New cards

Sequence is...

the order in which the statements in a program are executed

7
New cards

Selection is...

a programming construct where a section of code is run only if a condition is met

8
New cards

Repetition is...

when lines of code are run multiple times

9
New cards

Iteration is...

repeating an action until you achieve the correct outcome

10
New cards

Input/output is...

the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system

11
New cards

Processing is...

the series of actions that a computer (the CPU) takes in response to commands that a user requests

12
New cards

A pill shape on a flowchart is...

the start/end point

13
New cards

An arrow on a flowchart is...

a connector that shows relationships between the representative shapes

14
New cards

A parallelogram on a flowchart is...

an input/output

15
New cards

A rectangle on a flowchart is...

a process

16
New cards

A rhombus on a flowchart is...

a decision

17
New cards

A variable is...

a named memory address that holds a value

18
New cards

Multiplication symbol is...

*

19
New cards

Modulus symbol is...

%

20
New cards

Division symbol is...

/

21
New cards

To the power of symbol is...

^

22
New cards

Equals symbol is...

==

23
New cards

Not equal to symbol is...

!=

24
New cards

Linear search works by...

starting at the beginning of the data set and examining each item of data until a match is made. Once the item is found, the search ends. If there is no match, the algorithm must deal with it :p

25
New cards

Merge sort works by...

using a technique called divide and conquer. The list is repeatedly divided into two until all the elements are separated individually. Pairs of elements are then compared, placed into order and combined. The process is then repeated until the list is recompiled as a whole.

26
New cards

Computers store data in...

binary

27
New cards

Letters on computers are generally encoded in...

ASCII

28
New cards

To determine the maximum number of states that can be represented by n binary digits you...

use the formula 2^n

29
New cards

The first digit in signed binary represents...

the sign; 0 is positive and 1 is negative

30
New cards

The first digit in two's complement binary represents...

negative (largest number in that size binary) - the numbers smaller than it are then added on to get closer to 0

31
New cards

Shifts are known as ... operations because...

bitwise, they operate on each bit in a pattern, one at a time

32
New cards

In left logical/arithmetic shifts...

the MSB and all remaining bits are shifted left, 0s are placed in the vacated locations on the right, this has the effect of multiplying by 2

33
New cards

In right logical shifts...

the LSB is shifted right, out of the pattern, 0s are placed in the vacated locations on the left, this has the effect of dividing by 2

34
New cards

In right arithmetic shifts...

the LSB is shifted right, out of the pattern, the MSB is maintained and placed in all the vacated locations on the left, this has the effect of dividing by 2 while keeping the sign

35
New cards

Right arithmetic shifts are used with...

signed binary

36
New cards

Signed integer arithmetic shift left can create...

overflow errors when the sign changes

37
New cards

To convert from binary to denary you...

take each place value that has a 1, and add them together

38
New cards

To convert from denary to binary you...

start by subtracting the biggest place value you can from the denary number, then place a 1 in that place value column. Next, subtract the second biggest place value you can, and place a 1 in the column. Repeat this process until you reach zero

39
New cards

Overflow is...

when an arithmetic operation attempts to create a numeric value that is outside of the range

40
New cards

Hexadecimal is used because...

large numbers can be represented using fewer digits, which is easier for humans to understand

41
New cards

Hexadecimal is used for...

memory addresses, colours, MAC addresses etc.

42
New cards

Hex values go from...

Hex: 0 - F
Denary: 0 - 15
Binary: 0 - 1111

43
New cards

Lowercase ASCII characters are...

32 higher than their respective uppercase charactere

44
New cards

The IEC units of data storage are...

bit, nibble, byte, kibibyte, mebibyte, gibibyte and tebibyte

45
New cards

To go from byte → kibibyte etc. you...

× 1024

46
New cards

The symbols for ceiling function are...

⌈ and ⌉

47
New cards

In the Von Neumann stored program concept...

o Both instructions and data are stored in memory.
o The contents of memory can be changed to implement other functionality.
o This approach allows modern computers to be reprogrammed.

48
New cards

Secondary storage is needed because...

You need some way of reading and editing data and storing the data when the computer has no power.

49
New cards

Non-volatile memory is...

memory that can retain the stored data even when not powered - i.e. secondary storage

50
New cards

How does solid state technology work (flash)?

Solid state technology (flash) works by a flow of electrical current forcing pools of electrons into floating gates between two oxide layers, causing a change in the level of charge in the oxide gate, which can be measured as a 0 or a 1. This means that flash drives have no moving parts. Data is written and read from NAND chips, which contain huge amounts of transistors, with a 1TB SSD on its own containing trillions of them.

51
New cards

How does optical technology work?

A laser is shone at the media, and then the reflection is processed. With read-only drive, during writing the surface of the media is physically burned by the media creating pits and lands, which are reads as 0s and 1s (more precisely, the parts where the pits end cause the laser light to scatter, so it's not read as well, and this change in reflection is read and interpreted as 0s and 1s). It's possible to press optical discs cheaply many thousands of times. Data is read in a spiral around the drive, making them slower. With rewritable drives, the composition of the disc is changed with a reversible chemical reaction. Some examples are CDs, DVDs & Blu-Rays.

52
New cards

How does magnetic technology work?

Magnetised compounds point north or south, and these polarities are read as 0s and 1s. Hard disks have a drive head which physically moves over the surface of the disk. This drive head is a mechanical component which will fail over time, and it is also much slower than an SSD with no moving parts. Tapes were and still are used for backups, which are another type of magnetic media. However, because they can only be read and written sequentially, it limits how data can be stored on them, and they are extremely slow.

53
New cards

Advantages of solid state:

Durable & reliable (no moving parts), fast access times, capacities going up, prices going down, low power, no need for defragmentation

54
New cards

Disadvantages of solid state:

Cost (for now), limited read/writes over time

55
New cards

Advantages of optical:

Cheap, lightweight, portable, has rewritable variants

56
New cards

Disadvantages of optical:

Slow access times, prone to scratches, limited capacities, not all rewritable

57
New cards

Advantages of magnetic:

Cheap, large capacity

58
New cards

Disadvantages of magnetic:

Slow access times, fragile (especially in a laptop if dropped), has moving parts, need for defragmentation

59
New cards

The purpose of an operating system is to...

Provide a platform for other software, so that this software can interact with the computer hardware

60
New cards

Functions of an operating system include...

file management, process management, peripheral management, user management, memory management

61
New cards

Utility software...

helps maintain the system

62
New cards

Some examples of utility software include...

file repair, backup, data compression, disk defragmentation, anti-malware

63
New cards

What is the purpose of disk defragmentation?

When a file is stored on a hard disk it is actually stored not as a whole file, but as a series of segments. Sometimes, the segments can get spread across a large area of the drive, so disk defragmentation moves them closer together for faster read speeds.

64
New cards

Why is robust software important?

Software that isn't robust can contain vulnerabilities - flaws in code that introduce security issues into software.

65
New cards

Some examples of bad coding practices are...

o Poorly planned design
o Quick fixes for problems
o Not using industry coding standards
o Poorly structured code
o Insufficient testing

66
New cards

An audit trail is...

a record of what has been done, and who or what did it - it can be used to check what happened and return the system to a previous state if needed

67
New cards

An code review is...

a check of source code by other experienced programmers to check it is well written and that no security issues have been created

68
New cards

What happens during decode?

o The data now in the instruction register is split into two parts - the instruction and the data.
o The control unit decodes the instruction and gets things ready for the next step.

69
New cards

What happens during execute?

o The execute stage is the point at which data processing happens.
o Instructions are carried out on the data. Some instructions are carried out by the arithmetic logic unit.

70
New cards

Malware is...

malicious software - software which is hostile, malicious or intrusive

71
New cards

A virus is...

malware which spreads between computers while multiplying

72
New cards

A worm is...

a virus which can travel without a host program

73
New cards

A trojan is...

malware which disguises itself as a legitimate program

74
New cards

Ransomware is...

malware which prevents you from accessing programs/files, usually by encrypting them. To decrypt them, the attacker will demand a ransom

75
New cards

Key loggers are...

a kind of spyware which records what is typed on your keyboard - including usernames, passwords, bank details etc.

76
New cards

Some vulnerabilities that can be exploited by hackers include...

unpatched software, out-of-date anti-malware

77
New cards

Social engineering is...

when hackers (social engineers) exploit human behaviour, fallibility, and goodwill to gain confidential information

78
New cards

Some kinds of social engineering include...

phishing, pretexting (blagging), baiting, quid pro quo

79
New cards

Signature databases work by...

comparing the unique file signature of a program to a database of known viruses - if they match then the program is deemed to be a virus. However, this can only catch known viruses, not zero-days.

80
New cards

Statistic heuristic analysis works by...

comparing code in the program to known malicious code

81
New cards

Dynamic heuristic analysis works by...

running the program in a virtual environment and checking for any suspicious activity

82
New cards

An AUP is...

an Acceptable Use Policy - a collection of rules and procedures that employees are required to follow in order to protect their organisation's systems and networks

83
New cards

An embedded system is...

usually a simple computer, often on a single printed circuit board, which is built into a larger device in order to control it

84
New cards

Some characteristics of an embedded system include...

task-specific (single purpose), low power consumption, small physical size, low maintenance, low cost, often real-time or responsive to surroundings

85
New cards

Pixel

'picture element' - a tiny square in a large grid of squares on a computer screen

86
New cards

Bitmap

a method for storing images using pixels - it is a map of where the bits of information are stored (stored as a sequence of numbers for each pixel's colour)

87
New cards

Resolution

how tightly packed the pixels are; affects image quality - a higher resolution means the image has more pixels closer together, which results in a larger file size (pixels per inch)

88
New cards

Colour depth

the number of bits used for each pixel to define a colour - the larger colour depth, the larger the file size

89
New cards

Metadata

additional data about the file itself e.g. file type, data created, author, height/width, resolution, colour depth

90
New cards

Image size =

width x height (number of pixels)

91
New cards

Width (in pixels) =

width (inches) x resolution (pixels per inch)

92
New cards

File size =

width (pixels) x height (pixels) x colour depth (bits) + metadata

93
New cards

Amplitude

the value of the wave (y-axis) at a given point in time (x-axis)

94
New cards

Bit depth

the number of bits needed to represent the range of values on the y-axis

95
New cards

X-axis

time values

96
New cards

Y-axis

binary values

97
New cards

Sampling

taking a snapshot of the analogue signal at one single point in time

98
New cards

Quantisation

mapping that snapshot to a binary value

99
New cards

Sample interval

the time between samples (seconds)

100
New cards

Sample rate

the number of sound samples taken per second (Hz)