computer science 13,14,15,16,17,18 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

describe the purpose of a user defined data type 2

A
  1. to create a new data type from existing data types
  2. to extend the flexibility of the programming language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

explain how an interpreter executes a program without producing a complete translated version of it 4

A
  1. an interpreter examines the source code 1 line at a time
  2. and checks each statement for errors
  3. if no error is found, the statement is executed
  4. if an error is found, it’s reported and the interpreter haults
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

explain why the reverse polish notation (RPN) is used to carry out the evaluation of expressions 2

A
  1. RPN provides an unambiguous method of representing an expression
  2. reading from left to write
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

identify with reasons, a data structure that could be used to evaluate an expression in RPN 2

A

structure: stack
- the operands are popped from the stack in the reverse order to how they were pushed

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

give 2 benefits and 2 drawbacks of packet switching 4

A

benefit 1: accuracy - it ensures accurate delivery of the message

benefit 2: completeness: missing packets can be easily detected and a re-send request is sent so the message arrives complete

drawback 1: network problems may introduce errors in the packets

drawback 2: it requires complex protocols for delivery

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

explain he reason why binary numbers are stored in normalised form 3

A
  1. to store the maximum range of numbers in the minimum number of bits
  2. it enables very large numbers to be stored with accuracy
  3. it avoids the possibility of many numbers having multiple representations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

compare sequential and serial methods of file organisation 4

A
  1. in both , records are stored one after the other and need to be accessed one after the other
  2. serial files are stored in chronological order

3.sequential files are stored with ordered records

  1. in serial, new records are added in the next available space
  2. in sequential, new records are inserted in the correct position
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

state the most suitable method of file access when a record is referenced by a unique address on a disk-type storage medium 1

A

direct acess

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

state the most suitable method of file access when a bank stores its data records in ascending order of account number 1

A

sequential access

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

explain how packet switching is used to transfer messages across the internet 5

A
  1. a large message is divided up into a group of smaller chunks of the same size called ‘packets’
  2. the packet has a header and payload
  3. the header contains a source IP address, destination IP address and sequence number
  4. each packet is dispatched independantly
  5. the packets may arrive out of order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

outline the function of a router in packet switching 3

A
  1. the router examines the packet’s header
  2. a router has access to a routing table
  3. containing information about e-gateways
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

a record is a user-defined composite data type

explain what is meant by a user-defined composite data type and include an example of another user-defined composite data type 3

A

a composite data type refers to other/many types, user-defined data types created by the programmers to suit specific needs. an example, in python, you can create user-defined data types using classes

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

describe what is meant by RISC and CISC processors ( 2 points for each)

A

RISC- it uses simple instructions and fixed length instructions

CISC- it uses many instruction formats and uses variable length instructions

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

identify 2 differences between RISC and CISC processors 2

A

RISC has fewer instructions while CISC has more instructions

RISC has many registers while CISC has fewer registers

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

outline the functions of the Transport and Internet layers of the TCP/IP protocol suite 5

A

Transport layer:
- it regulates the network connections
- data is broken up into packets which are then sent to the internet layer

internet layer:
- it identifies the intended network and host
-it moves traffic across local segments
-encapsulates IP packets into frames for transmission

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

state what is meant by enumerated data type

A

a non-composite user-defined data type defined by a given list of all possible values

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

what is meant by the term pointer data type

A

a non composite data type that uses memory address of where the data is stored

18
Q

describe the process of pipelining during the fetch execute cycle in RISC processors 4

A
  • instructions are subdivided into tasks
    -each subtask is completed during one clock cycle
    -No 2 instructions can be executed during the same stage at the same clock cycle
    -the second instruction begins in the second clock cycle while the first instruction has moved on to it’s second subtask
19
Q

explain why a protocol is used in communication between computers 2

A
  • both parties need to agree the protocol being used to ensure successful communication, eg. parity checking, without agreeing this protocol, it would be impossible to do a parity checking
20
Q

describe the purpose of IMAP protocol

A

it’s a pull protocol used when receiving emails from an email server

21
Q

describe how records are organised and accessed in a sequential file 3

A
  1. records are stored one after the other and are accessed one after the other
  2. the files are stored in particular order.
    3.new records are added based on the key field
22
Q

state 2 examples where it would be appropriate to use packet switching 2

A
  1. commonly used on data networks such as the internet to send large data files that don’t need to be to be live streamed
  2. used for emails text messages, documents
23
Q

describe the use of pipelining in RISC 2

A
  1. pipelining allows several instructions to be processed simultaneously
    2.each instruction is completed during one clock cycle
24
Q

explain the use of graphs to aid AI 3

A
  • graphs provide structures for relationships
  • graphs may be analysed
  • Artificial Neural Networks can be represented using graphs
25
Q

describe the purpose of SSL and TLS PROTOCOLS 2

A
  • they provide encryption
  • they enable two parties to identify and authenticate each other
26
Q

explain how SSL/TLS protocols are used when a client-server communication is initiated 4

A

an SSL/TLS connection is initiated by an application which becomes the client

every new session begins with a handshake and the encryption algorithms are agreed

27
Q

state the reason for having multiple hidden layers in an artificial neural network

A

it enables deep learning to take place

28
Q

explain how artificial neural networks enable machine learning 4

A

1- artificial neural networks are intended to replicate the way human brains work

2- the data are input at the input layer and are passed into the system

3- decisions can be made without being specifically programmed

4-the output layer provides the results

29
Q

state 2 uses of stack

A

procedure calls
interrupt handling

30
Q

describe 2 benefits and 1 limitation of using a virtual machine for this purpose 6

A

benefit 1 : new system can be tried on different virtual hardware without need to purchase the hardware

benefit 2 : easier to recover if software emulating the new computer causes system crash as VM provides protection to other software

limitation : a virtual machine may not be as efficient so processing time is increased

31
Q

what is meant by deep learning

A

it uses Artificial neural networks that contain a high number of hidden layers

32
Q

what is meant by virtual memory

A

secondary storage that is used to extend the RAM

virtual memory is created temporarily

33
Q

state one difference between paging and segmentation in the way memory is divided

A

paging allows the memory to be divided into fixed blocks and segmentation divides the memory into variable sized blocks

34
Q

outline the reasons for deep learning 2

A

-deep learning makes good use of unstructured data
-it provides a more accurate outcome with higher number of hidden layers

35
Q

state when an underflow occurs in binary floating-point system

A

when following a logical operation and the results are too small to be represented in the available system

36
Q

outline the purpose of syntax analysis

A

it checks that the code matches the grammar of the language

syntax errors are reported

37
Q

describe what is meant by a virtual machine
state 2 benefits and 2 drawbacks

A

virtual machine: the emulation of a computer system using a host computer system

benefit 1: multiple guest operating systems can be used on the same computer
benefit2: cost savings due to not needing to purchase extra hardware

drawback1: virtual machines are not efficient
drawback2: complex to maintain

38
Q

state 2 differences between symmetric and asymmetric encryption 2

A

-symmetric uses a single key while asymmetric uses a pair of keys

-symmetric single key is used by all, only 1 of the keys for asymmetric is available to everyone

39
Q

explain the process by which an organisation may aquire its digital certificate 4

A

-the organisation requests a certificate from the CA

-the organisation may send their public key

-the CA verifies the organisations identity

-the CA generates a digital certificate including the organisation’s public key and other info

40
Q

describe supervised learning and unsupervised learning in machine learning 4

A

supervised learning: allows data to be collected and uses labelled input data

unsupervised learning: only requires input data to be given and uses any data

41
Q

explain the need for scheduling in process management 3

A
  • to allow the high priority jobs to be completed first
    -to keep the cpu busy all the time
    -to ensure that all the processes execute efficiently
42
Q

describe these scheduling routines and identify a benefit for each one
shortest job first, round robin, first come first served 6

A

shortest job first: short processes are executed first and followed by longer processes which leads to an increased throughput because many processes are executed in less time

round robin: each process is served by the cpu for a fixed time so starvation doesn’t occur

first come first served: each process requested is queued as it is recieved and executed one by one and starvation doesn’t occur