Computer Science Paper 1 Flashcards

1
Q

PC

A

Program counter, contains the address of the next instruction

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

CIR

A

Current Instruction Register: stores the address of the next instruction currently being executed and decoded

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

MAR

A

Memory Address Register, holds relevant memory address (to read from or write to)

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

MDR

A

Memory Data Register, stores data being transferred to and from memory, acts as a buffer

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

ALU

A

Arithmetic and Logic Unit, does all mathematical calculations and makes all logical decisions

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

Accumulator

A

A storage register in the ALU that holds data temporarily while the data is processed and before it is transferred to memory.

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

RISC

A

Reduced Instruction Set Computer: Only simple instructions taking one clock cycle are executed - currently more widely used than CISC.
- Advantages: allows for pipelining, execution will be quicker or as fast as CISC.
- Disadvantages: Compiler has to do more work, more RAM required

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

CISC

A

Complex Instruction Set Computer: Large instruction set is used to minimise lines of code required - mainly used for microcontrollers and embedded systems.
- Disadvantages: Compiler has to do more work, more RAM required.

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

GPU

A

Graphics Processing Unit - dedicated graphics processor on a graphics card, used to render images stored in the RAM of the graphics card.

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

Multi-core CPU

A

A CPU with more than one core on the same chip - makes use of parallel processing for optimum efficiency

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

What affects processor performance?

A
  • The number of processor cores: more cores -> better performance.
  • The processor’s clock speed: faster clock speed -> better performance
  • Amount/type of cache memory: more/better cache memory -> better performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

RAM

A

Random Access Memory - stores programs and data currently in use. Volatile

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

ROM

A

Read Only Memory - holds information which must be permanently in memory eg. BIOS

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

What are the functions of an operating system?

A
  • Providing a user interface
  • Memory management
  • Interrupt sevice routines
  • Processor scheduling
  • Backing up data
  • Input and output management
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the types of memory management?

A

Paging: Available memory is divided into fixed size pages, process in memory can be held in non-contiguous pages, mapped to logical addresses by a page table.
Segmentation: Divides address space logically into segments of varying length

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

What is virtual memory?

A

A technique that uses a portion of the computer’s hard disk as an extension of RAM - swaps files in and out of RAM by a process called disk thrashing

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

What is a distributed operating system?

A

Form of parallel processing system which splits tasks over multiple computers - OS coordinates so that the system appears to the user as a single system

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

What is a multitasking operating system?

A

An OS which allows each user to run more than one job at a time.

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

What is a multi-user operating system?

A

Allows multiple users to use a computer system by allocating each one a slice of processor time - uses a scheduling algorithm

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

What does a mobile operating system comprise of?

A

Mobile OSes are made up of two separate operating systems:
A main system operating the user interface/application software.
A low-level real-time operating system which is hardware-specific.

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

What is an embedded operating system?

A

An OS on a chip instead of on a hard drive, designed to do simple things adapted for specific hardware/functions

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

What is a real-time operating system

A

Processes data as it comes in - in real time

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

Open Source Software

A

Program code made publicly available for free; it can be copied, distributed, or changed without the stringent copyright protections of proprietary software products.

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

Closed Source Software

A

Also know as proprietary software, computer software licensed under exclusive legal right of the copyright holder with the intent that the licensee is given the right to use the software only under certain conditions, and restricted from other uses, such as modification, sharing, studying, redistribution, or reverse engineering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Utility program
A small program that performs many of the general housekeeping tasks for the computer, such as system maintenance and file compression - Disk defragmentation, automatic backup/updating, virus checking, compression software
26
Scheduling Algorithms
- Round robin - Shortest remaining time - Shortest job first - First come, first serve - Multi-level feedback queues
27
Shortest remaining time
A scheduling algorithm that deals with each user or task based on a calculating an estimated time remaining to complete.
28
Shortest job first
A scheduling algorithm that deals with each user or task based on the getting the smaller ones out of the way.
29
Multi-level feedback queues
This algorithm is designed to give preference to short jobs, give preference to input/output bound processes and separate processes into categories based on their need for the processor.
30
Round Robin
Processes are dispatched on a first in first out (FIFO) basis, with each process in turn being given a limited amount of CPU time, called a time slice.
31
First come first served
Processes are carried out by the CPU in the order in which they arrive
32
BIOS
Basic input/output system contains programs to load the hardware, stored in ROM
33
Device drivers
Utility software used by the operating system to communicate with peripheral devices.
34
Virtual machines
A software implementation of a computer system, allowing one physical computer to run several "virtual computers", each with their own independent operating system and application software.
35
Low-level language
A programming language that is designed to be easy for a computer to execute; also called machine language or assembly language.
36
High-level language
A programming language like Python that is designed to be easy for humans to read and write.
37
Interpreter
Converts a program written in a higher level language into a lower level language and executes it, one line at a time
38
Compiler
Translates a high-level source program into machine instructions readable by a processor and saves it to disk. The program executes when run.
39
Assembler
Translates an assembly-language program into machine code
40
Stages of compilation
- lexical analysis - syntax analysis - code generation - optimisation
41
Lexical analysis
- Comments and whitespace are removed. - Code is converted to a series of tokens. - Variables, and subroutines stored in symbol table which also holds data such as scope and data type.
42
Syntax analysis
- The code is checked to ensure it follows the rules of the language. Where it breaks the rules of the language errors are generated. - If no rules are broken then it's passed on to the next stage.
43
Code generation
The object code (accept machine code) is created (i.e. the binary that is executed by the processor).
44
Code optimisation
This code may be inefficient: may contain unnecessary instructions or groups of instructions that can be replaced by simpler ones (point of optimisation).
45
Linker
Combines together a number of separate object code files.
46
Loader
Loads an executable program into main memory
47
Library programs
A collection of compiled routines that other programs can use
48
Waterfall lifecycle
Sequential stages, each stage must be completed for the next to follow - suitable for small projects requiring supervision, drawback that no user involved
49
Spiral model
Uses structured steps but develops a program iteratively, constantly improving upon a prototype, allows for productive user input as they can comment on a prototype
50
Agile modelling
Prioritises user participation: keeps model simple and relies on rapid user feedback to make rapid incremental changes, allows for productive user input as they can comment on a prototype
51
Extreme Programming
Produces frequent project releases in short development cycles, improving productivity and introducing checkpoints, good for large projects to present bogging down
52
Rapid Application Development (RAD)
A development method that uses workshops/focus groups and an iterative approach to rapidly produce a high-quality system, good for large projects to present bogging down
53
Procedural Programming
Method of programming that uses step-by-step instructions (encompasses structured programming) supported by python/pascal
54
Object-oriented programming
A style of programming that involves representing items, things, and people as objects rather than basing the logic around actions, supported by Java, Python, Delphi
55
Declarative programming
Problem is described, language implementation decides how to solve it eg. SQL
56
Functional Programming
A programming paradigm that uses functions to create programs. Supported by Haskell, Python, Java
57
ADD
Add the contents of the memory address to the accumulator
58
SUB
Subtract the contents of the memory address from the accumulator
59
STA
Store the accumulator value in the memory address given
60
LDA
Load the contents of the given memory address into the accumulator
61
BRA
Branch- use the address given as the address of the next instruction
62
BRZ
Branch to the given address if accumulator is zero
63
BRP
Branch to the given address if the accumulator value is positive (or zero)
64
INP
Input into the accumulator
65
OUT
Output contents of the accumulator
66
HLT
Stops the execution of the program
67
DAT
Indicates a location containing data
68
Addressing modes
- Immediate addressing - Direct addressing - Indirect addressing - Indexed addressing
69
Immediate Addressing
The operand is the actual value to be operated on
70
Direct Addressing
The operand holds the memory address of the value to be operated on
71
Indirect Addressing
The operand is the location holding the address of the relevant data
72
Indexed Addressing
Modifies the address in the address field by the addition of a number held in a special-purpose registers, called an index register, before the address is used.
73
Classes
A description of what data looks like and can do: an object is an instance of a class
74
Methods
Things that objects are coded to do
75
Attributes
The data associated with an object
76
Inheritance
Where a class retains the methods and attributes of its parent class as well as having its own
77
Polymorphism
When subclasses redefine a method or attribute originally inherited from a superclass
78
Encapsulation
The process of keeping an object's attributes private so they can only be accessed and changed via public methods
79
Lossy Compression
A data compression techniques in which some amount of data is lost - redundant information is eliminated
80
Lossless Compression
A data compression algorithm that allows the original data to be perfectly reconstructed from the compressed data - no data is lost, file size is still made smaller
81
Run Length Encoding
A compression algorithm that represents an image in terms of the length of runs of identical pixels - lossless
82
Dictionary-based compression
Uses a dictionary to replace repeated phrases with shorter binary strings - lossless
83
Symmetric Encryption
An encryption method whereby the same private key is used to encode and to decode the message
84
Asymmetric Encryption
A type of encryption based on algorithms that require two keys -- one of which is secret (or private) and one of which is public (freely known to others).
85
Hashing
Hashing is a method to convert any data into a fixed-size string of characters called a hash.
86
Uses of Hashing
- Passwords - Digital signatures - Digital certificate - Hash tables
87
Compare encryption and hashing
Hashed data cannot be reversed to the original data whilst encrypted data can be decrypted to the original data. The processing time for hashing is faster than encryption as strong encryption is quite slow. Encryption uses keys whilst hashing does not.
88
Flat file database
Database which consists of just one table.
89
Primary Key
A field (or group of fields) that uniquely identifies a given entity in a table.
90
Secondary Key
A field that has some identifying information, but typically does not uniquely identify a record with complete accuracy.
91
Foreign Key
A primary key of one table that appears as an attribute in another table and acts to provide a logical relationship between the two tables.
92
Composite Key
Two or more fields that collectively define the primary key by unique combinations of their values.
93
First Normal Form (1NF)
A table that has a primary key and in which there are no repeating attributes or groups of attributes
94
Second Normal Form (2NF)
A table in first normal form in which there are no partial dependencies (only relevant if the primary key is a composite primary key).
95
Third Normal Form (3NF)
A table in 2NF where all attributes are dependent on the key, the whole key and nothing but the key
96
SELECT
SELECT field(s) FROM table(s) WHERE criteria ORDER BY ascending/descending
97
CREATE TABLE
CREATE TABLE name ( field1 datatype, field2 datatype, ... );
98
ALTER TABLE - ADD Column
ALTER TABLE name ADD field datatype;
99
ALTER TABLE - DROP COLUMN
ALTER TABLE name DROP COLUMN column;
100
ALTER TABLE - RENAME COLUMN
ALTER TABLE name RENAME COLUMN old-name to new-name;
101
MODIFY COLUMN name modification
ALTER TABLE name MODIFY COLUMN name modification;
102
INSERT INTO
INSERT INTO table_name (columns) VALUES (values);
103
UPDATE
UPDATE table SET field = new value WHERE condition
104
ACID
Atomicity, Consistency, Isolation, Durability
105
Atomicity
Requires that a transaction be processed completely or not at all
106
Consistency
No transaction can violate any of the defined validation rules eg. referential integrity must be intact
107
Isolation
Concurrent execution of transactions leads to the same outcome as if they were to be processed consecutively
108
Durability
Once transactions are committed, they cannot be undone
109
Record locking
Restricting access to a record whilst it is being updated to prevent loss of updates/inconsistencies
110
Redundancy
Storing the same fact in more than one place in case of emergency
111
DNS
Domain name system - the service that translates URLs to IP addresses.
112
Protocol Layering
Simplifying a network's design by dividing them into functional layers, and assigning different protocols to perform each layer's task.
113
Circuit Switching
A switching technique in which one endpoint creates a single path connection to another, depending on the requirement
114
Packet Switching
Data is split into chunks called packets which have labels including address being sent to and order. Each packet is sent on the most convenient/avoidable route meaning they may arrive in a different order to which they were sent. Once packets arrive at receiver they are reordered.
115
What is a WAN?
Wide Area Network: a network comprised of many LANs to cover a large geographical area
116
What is a bus topology?
- Bus topology is where computers and other devices in a network are attached to a single backbone. -Advantage: Inexpensive to install - less cable and specific hardware than a star. -Disadvantages: low security and reliability because of shared backbone, performance degrades with heavy traffic.
117
What is a star topology?
- Star topology is where client machines are connected to a central switch or hub, which is usually in turn connected to one or more servers. Signals travel in either direction. - Advantages: Consistent performance and more reliable - difficult to derail entire system, transmissions are more private/secure, new stations can be added with minimal disruption - Disadvantages: More expensive because more cable is required, single point of failure in central switch
118
Physical Topology
The physical arrangement of connections between computers.
119
Logical Topology
The logical way computers connect on a network - the shape of the path the data travels in
120
What is the TCP/IP model?
A set of rules to format a message so it can be sent over a network: four connected layers allow communication to take place: - Link Layer - Network Layer - Transport Layer - Application Layer
121
What does the network layer do?
Responsible for addressing and routing of messages
122
What does the transport layer do?
Responsible for preparing data to be transported across the network
123
What does the application layer do?
Provides access to network resources
124
What does the link layer do?
This layer controls the transmission and reception of packets of data to/from a local network
125
Firewall
A security barrier that controls the flow of information between the Internet and a private network. A firewall prevents outsiders from accessing an enterprise's internal network, which accesses the Internet indirectly through a proxy server.
126
Proxy Server
A server that acts as an intermediary between a user and the Internet.
127
Client-server network
A network that uses centrally administered computers, known as servers, to enable resource sharing for and to facilitate communication between the other computers on the network.
128
Peer-peer network
A network without a central file server and in which all computers in the network have access to the public files located on all other workstations
129
Code within these tags is interpreted as HTML
130
Content in main browser content area
131
The tag defines an image in an HTML page
132
Src defines the path (url) to the image.
133
Defines a hyperlink
134
Numbered list (ordered list)
135
Bulleted list (unordered list)
136
  • A list item (ordered and unordered)
    137
    How does a search engine index a page?
    A program called a crawler traverses the web taking each word in the document and adding an entry for the page (under the word) in the index alongside the word's position on the page.
    138
    Client-side processing
    Data is processed on a client computer instead of by the server This means the source code is visible, allowing it to be modified. This reduces unnecessary load on server
    139
    Server-side processing
    Server side processing uses the resources of the server to perform advanced calculations, manipulate data, and interact with databases. Using server side processing may cause latency because it involves communication with the server, which could lead to slower response times in comparison to client side processing.
    140
    Arrays
    Finite, ordered set of elements of the same type (static data structure)
    141
    Records
    A collection of fields that appear as a row in a database or table.
    142
    Queues
    FIFO - new items to the end, elements retrieved from the front
    143
    List
    An abstract data type consisting of a number of items - allows for an item to occur more than once
    144
    Linked List
    A dynamic data structure that consists of nodes, where each node contains data as well as a link to the next node, but that does not use contiguous memory.
    145
    Stacks
    LIFO - new items to the end, elements retrieved from the end
    146
    Graphs
    A set of nodes connected by edges (one or two way)
    147
    Trees
    Graphs in which there is a root - each node has only one parent
    148
    Binary Search Tree
    A binary tree with the property that for all parent nodes, the left subtree contains only values less than the parent, and the right subtree contains only values greater than the parent.
    149
    Hash tables
    Hash tables contain a table with data and a mapping function which assigns each entry a corresponding hash
    150
    Half Adder
    Takes an input of two bits and give a correct result of their addition
    151
    Full Adder
    Logic circuit with three inputs and two outputs.
    152
    D-type flip flop
    Can store 1 bit of data. Delay data up to one clock pulse. Two inputs: data and clock. Two outputs: delayed data, inverse of delayed data
    153
    Data Protection Act 1998
    Data must be processed fairly and lawfully: - Relevant - Accurate - Only used for intended purpose - Secure - Protected
    154
    Computer Misuse Act 1990
    The act which makes illegal a number of activities such as deliberately planting viruses, hacking, using IT equipment for fraud.
    155
    The Copyright Design and Patents Act 1988
    - Prevents illegal distribution of software - requires adequate licensing. - Does not apply to algorithms
    156
    The Regulation of Investigatory Powers Act 2000
    - Enables public bodies to demand information/cooperation from an ISP. - Existence of warrants and data can not be revealed in court