Complete Content Flashcards

1
Q

Give examples of three translation errors:

A
  • Syntax error: Spelling/punctuation errors including IF instead of ELIF
  • Linking Errors: Calling functions when the correct library hasn’t been linked to the program
  • Semantic Errors: Variables are declared illegally
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When is a value parameter preferable to a reference parameter?

A

Passing parameters by value are useful when doing a calculation in a subroutine as you can still retain the original value from the copy you have made.

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

What is ambiguity and why should high level programming languages be unambiguous?

A

Where there is an uncertainty of meaning and other interpretations are possible.
High level languages must be unambiguous so that there is only one way to interpret each statement.
This ensures accurate translation into machine code.

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

What other difficulties have programmers had to overcome when producing natural language interfaces?

A

Accents
Homonyms (Words that sound the same)
Proper nouns
Other Languages
Voice patterns

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

What is alpha, beta and acceptance testing?

A

Alpha testing is conducted in house by the developers and are not shared with an end-user or customer. They are not the final piece of software and will include limited functionality and many bugs.

Beta testing is conducted after alpha and are shared with a limited amount of end-users to beta test the system with live data. Will contain the main functionality but will still include some bugs. These bugs are reported by the testers and corrected by the development team.

Acceptance testing is the final phase of testing undertaken by actual end users with real data. The purpose of this is to ensure the system has met the original requirements and specifications of the customer.

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

What are the purpose of procedures in algorithms?

A

Programs can be broken down into smaller parts.
These can be named and reused any number of times throughout the code to perform a specific task.
It is used to avoid duplication of code and makes algorithms more efficient and secure.
Each procedure can also be individually tested without touching the rest of the code.

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

What is the difference between passing parameters by reference and by value?

A

Passing by reference is when the original value is passed through the subroutine therefore any changes made to the data is permanently stored in the original value.
Passing by value is where the original value is passed through the subroutine and a copy of it is created for the duration of the call. This means the original value will not be changed.

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

What are 3 examples of execution errors?

A

Runtime errors: Even though a program can compile, it could still crash or produce incorrect results.
Logical error: Division by 0 or incorrect use of operators.
File handling: Attempting to write to a file that doesn’t exist.

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

How does current legislation impact private data and what measures can be taken to protect this data?

A

GDPR 2018:
- All private data must be collected lawfully with consent.
- Data includes name, address and photos or anything that can uniquely identify an individual e.g. fingerprint.
- Parental consent needed if data is required from someone under the age of 16.

Data Protection Act 1998:
- Personal data shall be processed fairly and used within its lawful purpose.
- Personal data must be relevant.
- Companies must undertake in organisational measures in order to keep data safe and reduce damage or destruction of it.

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

What is a recursive sorting algorithm?

A

Algorithm that calls itself, using parameters and has a stopping condition. An example is a quicksort.

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

Two advantages of a recursive sorting algorithm:

A

Easier to write and useful when the data structure is fixed in size like an array.

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

What is version management?

A

To store, record and analyse different stages of code development.
Versions of software can be submitted through a version control system to track and record changes in projects and files.
Ensures developers don’t overwrite each others code.
Can also roll-back software if their program becomes corrupt during development.

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

How is program version management used in software engineering?

A

To track and save source code throughout the development process.
Commonly integrated into IDEs.
Examples are Git and Mercurial.
Create different versions to track changes.
Stored on local machines or servers.
Cloud based repositories can be used such as GitHub.
Cloud based ensures all developers have up to date programs.
Useful for tracking bugs.

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

What does the Von Neumann Architecture contain and how is it connected?

A

CPU containing the ALU, Registers and Control Unit.
Data bus connecting the input and output device.
Control bus connecting control unit with input and output devices.
2 arrows from CPU to memory.

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

What are the characteristics and use of cache memory?

A

Attempts to solve the Von Neumann Bottleneck where the processor runs faster than the memory.
Small, extremely fast memory.
Placed near the processor.
Data and instructions which are used regularly are stored here.

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

Why are the TCP/IP and FTP protocols important?

A

TCP/IP allows networked computers to communicate with each other.
Creates packets of data and decides how they are transported around the network.

FTP allows the transfer of large files across a network.
Has built in error checking.

17
Q

What are master files?

A

Holds the actual data that should be processed and is not periodically updated.
Data is held sequentially in key field order e.g. customer details.

18
Q

What are transaction files?

A

Contains the transactions that are supposed to be made to the data in the master file.
Stored serially in the order it was collected e.g. meter readings.

19
Q

What is an indexed sequential file and why is it better than a normal sequential file?

A

Records stored in key sequence order.
Indexes allow data to be accessed directly via their key field.
Faster access than a sequential file.

20
Q

What relevance do hashing algorithms and overflow areas have to random access files?

A

Location of the record is calculated using the algorithm.
Carried out on the key field.
Data collisions occur when two records are hashed to the same address.
Overflow areas are used to prevent this and store the latest piece of data.
May become slow if there is too many records in it.
If this happens a new hashing algorithm may be needed or a larger file.

21
Q

How is data stored in random access files?

A

Hashing algorithm used on key field to allocate an address for the data.
If data is assigned the same address there will be data collisions.
Large files will be fine however in smaller files overflow areas will be utilised.
Separate overflow area is where records are stored in the next available memory location.
Searching these have to be done linearly and can take time.
Progressive overflow is better as new address will be close to their actual home.
These overflow areas can be serial files or linked lists.

22
Q

How is data stored in indexed sequential files?

A

Records are saved in blocks in sequential order.
Records are located through the use of index block pointers.
Searching using indexes is faster than searching overflow areas.
Easy to add records by adding extra data blocks.

23
Q

How do control units fetch the next instruction?

A

The PC provides the MAR with the RAM address which is sent along the address bus and stored in the CIR. PC is then updated.

24
Q

How does the Control Unit execute the instruction?

A

Command is accessed in the CIR.
Data transferred from register to MDR to MAR where the data is sent along the address bus.

25
Q

How do you find the absolute error of a floating point representation?

A

Original value - Rounded value

26
Q

How do you find the relative error of a floating point representation?

A

Absolute error / original value X 100%

27
Q

What is the function of a switch in a network?

A

Connects computers in a local network.
Maintains a table containing the IP addresses so devices can send data to others.
Packets of data are received and their address is checked.

28
Q

What is the function of a router in a network?

A

Forwards data packets between networks.
Controls traffic on wide area networks such as the internet.
Determines the destination of data packets from their IP address.

29
Q

What is the function of a multiplexor in a network?

A

Allows multiple messages to be combined and sent over a data link simultaneously.
Time division multiplexing allocates a small time period for each data.
Frequency division multiplexing sends the data simultaneously but on different transmission frequencies.

30
Q

How does increasing the amount of bits allocated for the mantissa and exponent affect the floating point result?

A

More bits allocated for the mantissa increases the accuracy.
More bits for the exponent increases the range but loses accuracy.

31
Q

What are the roles of the PC, Accumulator and CIR?

A

PC is an incrementing counter which keeps track of the memory address.
Accumulator is the short term store of arithmetic data.
CIR is a temporary register which holds the current instruction that is being fetched from memory.

32
Q

Describe Boolean and fixed length string data types with their storage requirements.

A

Boolean is a data type that can have one of two possible values.
Can be stored in a single bit where 1 is true and 0 is false.

Fixed length strings are a number of characters where the length is fixed by the programmer.
The storage requirements is a factor of the character set used (Bit x max number of characters).

33
Q

What is sequential access?

A

Records are processed in order.

34
Q

How can an underflow error occur after carrying out a floating point operation?

A

Calculation is smaller than the computer can represent in the memory.
Needs to be rounded or truncated.