Set 4 Flashcards

Checked by Matt. Covers everything between SA3 and CAP1 on the BPCompSci topic list

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

What is a barcode?

A
  • A barcode is a sequence of parallel black and white bars with varied width and spacing that encodes binary information
  • Sometimes a check digit is added to the end of the barcode for validation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Operation of a barcode reader

A
  1. A light source / laser is directed at bar code // bar code is illuminated
  2. (Moving) mirror / prism moves light beam across bar code // user moves reader across bar code // user moves the bar code across the reader
  3. Light reflected back
  4. Black / white bands reflect different amounts of light // black reflects less light // white reflects more light
  5. Light sensor / photodiode / CCD (measures amount of reflected light)
  6. Light reflected converted into an electrical signal A. convert reflection to (binary) numbers / characters / ASCII
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are QR codes? How are they different from regular barcodes?

A
  • Two-dimensional barcodes
  • They have a higher storage capacity
  • QR codes are read using images, not lasers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Operation of a digital camera

A
  1. Light enters through the lens, focused on to an array of sensors on the sensor chips
  2. Grid of (pixel) sensors // CMOS/CCD sensor
  3. Each sensor measures light intensity of a point
  4. Each sensor produces an electrical signal
  5. The signal represents a pixel;
  6. Sensor outputs a voltage dependent upon light intensity
  7. Colour/Bayer filter is applied to generate separate data values for red, green and blue colour components
  8. The pixels are recorded as an array
  9. Voltages turned into binary data // voltages passed through Analogue-to-Digital Converter (ADC) // voltages turned into a digitised version of the image
  10. Image processing software analyses image
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Operation of a laser printer

A
  1. Bitmap of image built in memory from page description.
  2. (Negative) charge applied to (photosensitive) drum.
  3. Laser beam directed at drum. R. laser directed at paper.
  4. Mirror is used to direct laser beam.
  5. Where laser strikes drum charge is neutralised / reversed / cancelled / discharged.
  6. (Negative) charge applied to toner.
  7. Toner sticks to drum based on charge // where the laser struck.
  8. Paper passed over drum and toner transfers to it.
  9. Positively charged transfer roller assists transfer of toner from drum to paper. A. charge applied to paper assists with transfer.
  10. Heater fuses toner onto paper.
  11. For colour printing four different colour toners // four drums are required.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does RFID stand for and what is its purpose?

A

RFID (radio frequency identification) allows data to be transmitted wirelessly over radio waves.

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

What are the two parts to an RFID system?

A

Tag
Reader

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

What is in a passive RFID tag?

A
  • chip, which contains a small amount of memory
  • antenna
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does an RFID reader work?

A
  1. RFID tag contains (transmission) circuitry and antenna
  2. Memory on tag stores data
  3. RFID reader transmits / sends signal // emits electric / electro-magnetic field
  4. Signal activates / energises / induces current in RFID tag
  5. RFID tag transmits / sends data by radio (wave)
  6. RFID reader converts radio (wave) / signal back into (binary) data
  7. RFID tag (on a card) is a passive device
  8. RFID transmits over very short range
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Advantage of RFID over barcodes or digital cameras

A

The use of radio signals means that the system does not require a line of sight between the tag and the reader

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

What is a passive RFID tag? Range?

A
  • An RFID tag that doesn’t contain a power supply
  • The device is powered by radio energy transmitted by the reader
  • Range of up to 1m
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an active RFID tag? Range?

A
  • An RFID tag that has a small battery within the tag
  • The tag will transmit its identifier at regular intervals
  • Range of up to 200m
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give four reasons secondary storage is needed:

A
  • To store data / programs whilst the computer is turned off as the contents of RAM are lost when the computer is turned off R. ‘main memory’ for ‘RAM’
  • Allows the storage of data sets / files that could not fit in RAM
  • Secondary storage can be used for virtual memory
  • To transfer data / programs between computers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What type of storage are Hard Disk Drives?

A

Magnetic storage

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

What are the parts of a HDD?

A
  • at least one metal platter
  • a spindle which spins the platter
  • a read-write head on an actuator arm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe the operation of a HDD:

A

*Disk is coated in a magnetisable material
*Magnetising a spot in one direction could
represent 0 and the other direction could
represent 1
*Disk divided into rings called tracks
*Tracks divided into sectors / blocks
*Read/write head moves in / out to the correct track
*Wait until correct sector passes under read/write head
*Disk spins at high speed
*Read/write head senses magnetic field
and converts to 0s and 1s

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

Give four pros of a HDD:

A
  1. High read-write access speed (but slower than SSD)
  2. Greater Capacity than SSD
  3. … at a lower cost per GB than SSD
  4. Reliable and don’t degrade over time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Give four cons of HDDs:

A
  1. Not as portable as CD/DVD/USB memory sticks
  2. HDDs are more likely to fail as they are made up of lots of moving parts
  3. HDD’s are fragile (bumps and knocks damage disk)
  4. Slower access speeds that SSDs (slow seek time)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What type of storage are Solid State Drives?

A

solid state storage / NAND flash memory

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

Describe the operation of an SSD:

A
  • Data is stored electronically // there are no mechanical / moving parts
  • Data is stored in floating gate transistors // data is stored in transistors that
  • do not lose their charge/state when power is no longer applied // electrons
  • are trapped between oxide layers
  • Presence of trapped electrons / charge or absence indicates 0 / 1
    A. 0 or 1 either way around
    A. state represents 0 or 1
    A. off = 0, on = 1 (or other way around)
    A. “bit” for 0 or 1, but not “binary”
    R. positive and negative charges
  • NAND memory // flash memory // EEPROM memory is used
  • Data is organised into pages / blocks
  • A whole block (A. page) of data must be written // it is not possible to write
  • individual values
  • A block (A. page) must be erased before it can be overwritten
  • Controller manages the organisation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Give four pros of SSDs compared with HDDs:

A
  1. Faster than HDD
  2. No moving parts means it is more robust than HDD
  3. No moving parts means it uses less power than HDD
  4. No moving parts means it is quieter than HDD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

When is an SSD suitable?

A
  • When files need to be read or changed frequently (e.g. in a server)
  • Or when the system needs to be portable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Give two cons of SSDs compared with HDDs:

A
  • The number of times SSD devices can be written to is limited (hence unsuitable for long term archiving of data)
  • Higher cost per Gb than HDD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What sort of storage are optical drives?

A

Optical storage

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

Name three optical discs (e.g. CD), in increasing capacity

A
  • Compact Disc (CD)
  • Digital Versatile Disc (DVD)
  • Blu-ray Disc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Name the three types of optical drive (e.g. ROM):

A
  • ROM (read only)
  • R (recordable)
    • Can be written onto once. Good for archiving data
  • RW (rewritable)
    • Has a chemical dye layer on top of the reflective layer
    • The chemical dyes allow the burning process to be reversed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Principles of operation of optical drive?

A

How data is represented
* Data is stored on one spiral track
* Continuation of land/pit reflects light whereas transition between land and pit scatters light
* Transition between land and pit indicates a 1 and continuation of land/pit represents 0

Reading mechanism
* Low power beam of laser is shone at disk
* Light is focussed on spot on track
* Some light is reflected back from disk
* Amount of light reflected back is measured
* Disc spins at constant linear velocity

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

Give three pros of optical discs:

A
  1. Extremely light and portable
    … so they are good for media distribution
  2. Relatively cheap (for lower storage capacities)
  3. Reliable (unless scratched)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Give five cons of optical drive:

A
  1. Data can be ruined if disc is scratched
  2. Lower capacity than HDD and SSD
  3. Slow seek time
  4. Not all disks are rewritable
  5. Not compatible with very much anymore
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is a composite key?

A

A key composed of two or more attributes that together uniquely identify a record.

31
Q

When is normalisation (database) achieved?

A
  • When there is no redundant data and all related data is stored together
  • (When each attribute depends on the key, the whole key and nothing but the key)
32
Q

What is the saying for databases to be fully normalised?

A

“Each attribute must depend on the key, the whole key, and nothing but the key”

33
Q

What are the requirements for 1st normal form?

A
  1. Every record has a primary key
  2. No repeating groups → must include a copy of the primary key in the new table (creating a composite key)
  3. The data in each field must be atomic (i.e. data cannot be sensibly subdivided e.g. name → fname & sname)
34
Q

What is a repeating group?

A

A set of attributes whose structure repeats between rows

35
Q

Requirements for 2nd normal form

A

No partial dependencies
this means…
- Do all non-key attributes depend on all parts of the composite key?
- If not, take them out and create a new entity.
(So check all tables with composite keys)

36
Q

Requirements for 3rd normal form

A

No non-key dependencies
- All non-key attributes are checked to see if they are only dependent on the primary key.

37
Q

How do you signify the key in an entity relationship diagram?

A

Underlining

38
Q

Give the SQL command for: Selecting from two tables

A

SELECT table1.attributeX , table2.attributeY
FROM table1 , table2
WHERE table1.primarykey = table2.foreignkey
AND …

39
Q

What is a foreign key?

A

An attribute in one table that is the primary key field of another table.
It exists to make a link between the tables.

40
Q

What is application software? Give three examples

A

Application software is designed to perform tasks a user wants to complete (user-oriented tasks), e.g. word processors, spreadsheet software, movie editing, game, web browser, calculator etc. Examples must not use brand names such as Google Chrome

41
Q

What is system software?

A

Software used in the management of a computer system // layer(s) of software
that abstract the user from how the computer works // software that provides a
platform for other software to use
A. software used to run the computer
A. software that provides a virtual machine
NE. software that maintains a computerSystems software is software used in the management of a computer system.

42
Q

What are utility programs?

A

Software that performs a non-core / ancillary / specific management function for a computer
A. software that performs a task that helps manage / configure / maintain a computer
A. software that manages a computer system but is not essential
NE. software that manages a computer

43
Q

Give four types of system software

A

Operating System
Utility Programs
Libraries
Translators

44
Q

Give three examples of utility programs

A

virus checker, disk defragmenter, backup, compression, encryption software etc

R. examples that relate to core functions of the operating system
R. examples that are application software

45
Q

What are libraries?

A
  • Libraries are precompiled, pretested routines (sets of code) that other programs can link to and use
  • As long as the programmer includes a reference to the library in their code, they can access all the functions of the library
46
Q

How do libraries save developers time?

A
  • Common tasks can be written as libraries for repeated use
  • This saves time for developers as it saves them from having to rewrite the instructions
47
Q

What are translators?

A

Translators are systems software tools that are used to convert program code from one format into another, without adjusting the logical operation of the original program code

48
Q

Name three types of translator

A

Compilers, Assemblers, Interpreters

49
Q

What is the purpose of compilers?

A

To turn program source code into a target language version (eg machine code / bytecode) that can be executed by the computer

50
Q

What is the purpose of assemblers?

A
  • To turn low-level assembly language code into executable machine code
  • They are very fast to run
51
Q

How do interpreters work?

A

Interpreters run instructions from a high-level language by determining what actions should occur line-by-line and executing equivalent prewritten executable code.

52
Q

Why is the operating system classified as systems software?

A

It is required for the functioning/maintenance of the system itself, and performs tasks that are machine oriented

53
Q

Give four characteristics of a low-level language:

A
  • They are defined by the processor they are designed to run on
  • Non portable - they are specific to the instruction set of the processor they are written for
  • They are machine-oriented and have no built-in functions
  • There is a one-to-one mapping between a low-level language instruction and its equivalent machine code language instruction
54
Q

Why are low-level languages non-portable?

A

They are specific to the instruction set of the processor they are written for

55
Q

What two things make up a low level instruction?

A
  • Opcode - an represents the machine operation that the processor should perform
  • Operand(s) - a value or set of values relevant to the opcode
56
Q

Give three things the operand of a low level instruction can be, and what addressing mode is used in each case

A
  • memory locations (direct (memory) addressing)
  • register values (direct (register) addressing)
  • actual decimal values (the operand is the datum) (immediate addressing)
57
Q

Why is hexadecimal used in some low level languages?

A
  • Binary machine code is difficult for humans to debug and fix problems in.
  • So hexadecimal is usually used instead, as it is easier to read and understand
58
Q

What is assembly code?

A
  • A low-level language that uses a set of mnemonics that represent binary machine code instructions
  • Assembly code is converted into machine code using an assembler.
59
Q

Give three characteristics of high-level languages

A
  • High-level languages are problem oriented
  • Portable - not specific to any type of processor
  • One instruction in a high-level language represents many instructions in a low level language
60
Q

What is an imperative language?

A
  • A language where a problem is solved by writing a sequence of instructions that are followed in order
  • Instructions describe how to carry out a task // each instruction is a step
  • Instructions can change the state of the program
61
Q

Give eight advantages of high-level languages:

A
  1. Program code is easier to understand/maintain/debug
  2. Faster development time // programmers can be more productive // one line of HLL code can do the same job as many lines of assembly language
  3. Programs are (more) portable (to other hardware platforms)
  4. Availability of flow control structures A. Example(s) eg loops, selection
  5. Improved features for supporting modularity A. Ability to use subroutines
  6. Built-in support for data structures A. Example(s) eg arrays, records
  7. Language is problem-oriented
  8. Support for different paradigms A. Examples eg functional programming
62
Q

Give three pros of low-level languages:

A
  1. Assembly language code may execute more quickly
    R. If response suggests that faster execution is because translation is not required
  2. Assembly language code may use less memory
  3. Assembly language gives direct/better access to computer hardware // enables direct manipulation of memory (contents)

NE. “More efficient” for either executes more quickly or uses less memory

63
Q

What is a low-level language?

A
  • A language that is based upon the instruction set of a processor
  • They are defined by the processor they are designed to run on
64
Q

What is immediate addressing?

A
  • When the operand value is an actual value/datum that is part of the instruction
  • There is no need to go to any memory address in this case
65
Q

Give three advantages of compilers (over interpreters):

A
  • The source code cannot be accessed by users
  • Users do not need to have an interpreter to the run the program
  • The program will execute more quickly
66
Q

Why is code that will be executed in a web browser often interpreted rather than compiled?

A
  • It’s impossible to know what type of processor will be in the user’s computer
  • A compiled program will only execute on a processor of a specific instruction set, whereas interpreters can execute on a computer with any type of processor
67
Q

Why are translators necessary?

A
  • High-level instructions cannot be executed directly
  • Processors can only execute machine code instructions
68
Q

How do compilers and interpreters approach errors differently?

A
  • Compilers analyse the program as a whole, and will not translate any of the program if it encounters an error
  • Interpreters analyse the program on a line-by-line basis, and execute until the first error is encountered
69
Q

Give an example of an intermediate language and how its used

A
  • Bytecode
  • Compilers convert high-level code into bytecode, and then use a virtual machine to execute the bytecode on different processors
70
Q

What is the difference between source code and object code?

A
  • Source code is the input to a translator
  • Object code is the output of a translator
71
Q

Explain the relationship between hardware and software

A
  • Software is the programs that execute on the hardware
  • Hardware is the physical components that allow the software to execute
72
Q

What does computationally secure mean for a cipher?

A

A cipher is computationally secure if it cannot be cracked in ‘reasonable / polynomial time’.

73
Q

How is data stored on and read from a magneti HDD (ADDITIONAL BONUS POINTS)

A

*Whole block read together
*Data stored in buffer while being
read
*Can be many disks inside drive
known as platters
*Disk and drive are a sealed unit
*Data near outside edge of disk
stored less densely
*Disk has constant angular velocity
* Files stored in hierarchical structure / directories
* Free / used space indicated in file
allocation table
* Mirroring / striping / RAID may be
used for automatic backup

74
Q

Problems that can occur with databases that are not fully normalised

A
  • Redundant/duplicated data may waste storage space
  • If data is stored more than once then it could be inconsistent // two copies of the ‘same’ data item might store different values
  • If data is stored more than once then each copy of the data would need to be updated if it changed
  • It might not be possible to store data about one type of entity without creating a record for another type of entity // if a record for one type of entity does not exist then it might not be possible to store data about another type of entity
  • When a record for one type of entity is deleted it might delete the data about another type of entity // it might not be possible to delete a record for one type of entity without deleting the data about another type of entity
  • May be difficult to select/edit data if it is not atomic // if there are repeating groups