Computers Flashcards

(80 cards)

1
Q

What is a

computer?

A

a machine that takes some kind of input from its surroundings and then processes it to produce an output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are

hardware?

A

the physical components of a computer system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is

software?

A

the set of programs running on the hardware which direct the computer to perform specific operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the

stored program concept?

A

a proposed design for a new computer architecture where both program instructions and data are stored together in a computer’s main memory

this was by von Neumann

this is based on the premise that program instructions are only stored in a computer’s memory for as long as they are needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the

von Neumann architecture consist of?

A

main memory and a central processing unit interconnected by buses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does

main memory consist of?

A

a collection of storage locations, each with their own memory address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does it mean to be

volatile?

A

the content is lost when the power is turned off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the

CPU consist of?

(3)

A
  • control unit (CU)
  • arithmetic logic unit (ALU)
  • registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the

control unit do?

(2)

A
  • decodes instructions received from main memory
  • coordinates the actions of the other parts of the CPU in order to execute them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the

arithmetic logic unit do?

A

performs arithmetic and logic operations on data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do

registers do?

and what are some examples? (2)

A

provide fast, temporary storage for instructions, intermediate results and data

instruction register -> holds the instruction currently being executed
accumulator -> holds the results of calculations performed by the ALU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the

three types of bus?

A
  • address bus
  • data bus
  • control bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the

address bus do?

A

carries the address of the memory location that the CPU will read from or write to

(this is unidirectional)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the

data bus do?

A

holds the value being read from or written to memory

(this is bidirectional)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the

control bus do?

A

carries the command signals from the control unit to other components so that they know whether to read or write data, and the status signals back to the CPU

(this is bidirectional)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the

bus width?

A

the number of connections on a bus

a greater bus width means that a larger number of values can be communicated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does the

clock do?

A

sends out electronic signals at regular intervals to all the other hardware components in order to synchronise their actions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does

clock speed affect?

A

the faster the clock, the more instructions the CPU can execute per second

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is

pipelining?

A

the process of modern CPUs that execute programs more quickly by overlapping the stages of the fetch-execute cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the differences between

main memory and secondary storage?

(4)

A

secondary storage:
- non-volatile
- slower
- cheaper
- higher capacity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the

three common physical ways of recording binary data?

A
  • magnetic storage (hard drives)
  • optical storage (CDs and DVDs)
  • solid-state storage - aka ‘flash’ memory (USB memory sticks and SD cards)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is inside a

hard disk drive?

(magnetic secondary storage)

A

A stack of disks called platters made from a hard material (e.g. glass or ceramic).
The surface of each platter has a thin magnetic coating and is divided into billions of tiny areas.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How is data stored in a

hard disk drive?

(magnetic storage)

A

Data is stored on the surface of a platter as a series of bits. An area that is magnetised represents a 1.

(and vice versa)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How is data read/written onto a

hard disk drive?

(magnetic storage) (3 steps)

A
  1. Each platter has two magnetic read-write heads.
  2. These move in and out above the surface as the platter rotates at a high speed. (The arm positions the heads over the correct area of the platter to read or write data.)
  3. To write data to the disk, the heads alter the magnetic state of the surface. To read data, they detect the magnetic state.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
# How is data stored on optical storage?
Data is written along a single track that spirals out from the centre of the disk. It is stored as a series of pits and lands on the surface of the disk. A land represents the binary value 1 and a pit the value 0.
26
# How do you write data onto an optical disk?
The laser heats the recording material, which changes its form to become more or less reflective. Reflective areas represent lands and less reflective areas represent pits.
27
# How do you read data from an optical disk?
A laser beam is shone onto the surface. The amount of light reflected is detected by a light sensor and then interpreted as 1s and 0s.
28
# What are some positives of solid-state storage? | (4)
- no moving parts - energy-efficient - small - high-capacity
29
# How is data stored on solid-state storage?
chips (called NAND flash) trap electrons in a 'pool' | full pools represent 0s, empty pools represent 1s
30
# How do you write data onto a solid-state storage? | (3 steps)
1. Control signals identify the pool to be written. 2. They apply very precise electrical charges. 3. These cause electrons to move between two pools. ## Footnote A higher voltage pulls more electrons, which block current flow. Blocked current flow represents 0.
31
# How do you read data from solid-state storage?
1. Control signals identify which bit is to be read. 2. They apply a small voltage. 3. If the electron pool is empty, the transistor turns on and a 1 is read out. If the electron pool is full the transistor doesn't turn on and a 0 is read out.
32
# What is the key negative of solid-state storage?
both erasing and writing cause the transistor to break down over time | this limits the life of a flash drive
33
# Define embedded system.
a small computer designed to perform one specific function
34
# What are some characteristics of embedded systems? | (2)
- limited functionality - customised hardware and software
35
# What components are in an embedded system? | (4)
- sensors - battery - microcontroller - actuators
36
# What does the microcontroller in an embedded system consist of? | (4)
- flash memory - RAM - CPU - peripherals
37
# How does an embedded system work? | (4 steps)
1. Input devices (e.g. sensors) supply an embedded system with information from the outside world. 2. Data received is stored temporarily in the microcontrollers RAM. 3. The CPU interprets and acts upon the data according to the program instructions stored in flash memory. 4. If necessary a signal is sent to an output device (e.g. actuators) to carry out an appropriate action.
38
# What is the Internet of Things?
the collection and exchange of data by embedded systems with little or no human intervention
39
# What are the three main types of software?
- operating system - application software - utility software
40
# What is the operating system?
a program that controls and manages the hardware and all other software on a computer and provides an interface for users
41
# What is application software?
programs or apps designed for end users | e.g. web browser, spreadsheet, console game, email client
42
# What are some examples of operating systems? | (4)
- Microsoft Windows - Linux - Android - iOS
43
# What are the key functions of an operating system? | (4)
1. File management 2. Process management 3. Peripheral management 4. User management
44
# How are files organised by an operating system?
Files are organised in a hierarchical tree structure. ## Footnote The top node of the tree is the root directory. Nodes lower down are either directories, sub-directories or files. Every file in the system has a unique path so that it can be easily located.
45
# What is the key benefit of a hierarchical tree structure?
the filename can be used more than once
46
# What does the operating system do when there's a new file to be stored? | (3 steps)
1. It splits the file up into smaller pieces. 2. It stores each piece in an empty sector on the hard drive. 3. It keeps a record of the start location and sequence number of each piece so that it can retrieve and reassemble the file when it is required.
47
# What are the four different file permissions?
- read - write - execute - delete
48
# Define process.
a program that is loaded into main memory and is being executed
49
# What are the three key scheduling algorithms?
- first in, first out - shortest job first - round robin
50
# How does first in, first out work? | (2 steps)
1. Processes queue in the order in which they arrive. 2. The process at the head of the queue gets to use the CPU until it is finished or is help up waiting for another resource like a printer.
51
# How does shortest job first work?
The process which is closest to finishing goes next.
52
# How does round robin work? | (2 steps)
1. Processes wait their turn in a queue. The process at the head of the queue goes next. 2. At the end of its time slice, if it isn't finished, it goes to the back of the queue and the next process is taken from the front of the queue. ## Footnote Some processes have a higher priority than others and get more time slices.
53
# What is virtual memory? | and why does this occur?
when a paging algorithm swaps processes out of RAM and onto the hard drive | this occurs when RAM gets full
54
# Define device driver.
a piece of software that relays instructions and data between the OS and the peripheral device
55
# What are the three different types of user interface?
- graphical user interface (GUI) -> windows, icons, menus and pointers - WIMP -> e.g. Microsoft Windows, macOS - command-line text interface (CLI)
56
# What is utility software?
a collection of tools that help minimise the impact of data loss or damage caused by events such as a system failure, cyberattack, fire or flood
57
# What are some examples of utility software? | (5)
- file repair - backup - data compression - disk defragmentation - anti-malware
58
# What does a file repair tool do?
scans a damaged file, extracts as much data from it as possible, and stores it in a new useable file
59
# What does backup do?
It automatically backs up data stored on a computer's hard drive to another location, such as a network drive or the cloud. ## Footnote Should a file get lost or damaged, the most recent backup can be restored.
60
# What does a data compression tool do?
Compresses filed to reduce their file size, freeing up storage space and speeding up their transfer across networks.
61
# What does a disk defragmenter do?
Addresses the problem caused by fragmentation on magnetic hard drives by rearranging the files so that every file is stored in sequential sectors and free space is grouped together.
62
# What does anti-malware do?
tries to eleminate malicious software from a computer
63
# Define robust software.
software that is capable of handling the unexpected without crashing, generating incorrect output or revealing sensitive data
64
# Define code vulnerability.
a flaw in a program that compromises security ## Footnote this can be exploited by an attacker to - gain access to a computer system, enabling them to steal or corrupt data - introduce malware - take over control of the computer for some purpose of their own
65
# What are some examples of bad programming habits? | (6)
- not thought-through design - not sticking to agreed coding practices and standards - making do with a temporary fix for a problem - writing unstructured code instead of separating it into subprograms - useing third party library modules without checking that they are free from vulnerabilities - skimping on testing
66
# What is the purpose of code reviews? | and what are the two different types of this?
to spot instances of poor programming practice, find any vulnerabilities and check code efficiency | review by another programmer, automated review
67
# What happens with review by another programmer? | and why is this bad?
A more senior reviewer will look at the code produced, checking to see if any bad programming practices have been used or if any code vulnerabilities are present. | This is labour intensive and time consuming.
68
# What happens with automated review? | and why is this bad?
A specialist piece of software is used to examine the code. This software will highlight potential issues such as vulnerabilities or obvious bad programming practice. | This probably won't identify every issue.
69
# What is an audit trail? | and why is this good?
a track of who made what changes and when | it reduces errors and improves accountability
70
# Define instruction set.
the instructions that a CPU can execute
71
# Define machine code.
the binary codes representing a program
72
# Give three examples of high-level languages.
- python - visual basic - java
73
# Give an example of a low-level language.
assembly language
74
# Why is it harder to write programs in low-level languages? | (3)
- there are a very limited range of instructions - there are no strings, integers or real numbers - debugging can be more difficult
75
# What are the differences between compiled and interpreted code's translation?
compiled -> all the code is translated prior to being executed interpreted -> each source line is translated to object code just before it is executed
76
# What are the differences between compiled and interpreted code's speed?
compiled -> faster, more efficient, because it doesn't have to be translated as it is executing interpreted -> slower, because source code is translated line by line while execution is underway
77
# What are the differences between compiled and interpreted code's error reporting?
compiled -> errors are reported in a batch once the compiler has finished translating the source code interpreted -> an error in the source code is reported as soon as it is encountered
78
# What are the differences between compiled and interpreted code's code amendments?
compiled -> code must be recompiled if code is amended interpreted -> code must be translated and executed again is code if amended
79
# What are the differences between compiled and interpreted code's source code availability?
compiled -> only an executable file is given to the user, the original source code is not visible interpreted -> the source code must be given to the user to run on their machine, so it is visible
80
# What are the differences between compiled and interpreted code's portability?
compiled -> code is machine dependent, it will only run on a computer with a particular machine architecture - the source code would have to be recompiled in order for it to run on a computer with a different architecture interpreted -> code is platform independent and can be translated on any computer that has a suitable interpreter