Fundamentals of data representation Flashcards

1
Q

From the options below give examples of a natural number

  • -3
  • 7
  • 0
  • SQRT(-3)
  • π
  • 6.3
  • SQRT(3)
A

7 or 0

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

From the below options give examples of a member of set ℚ that is not an integer

  • -3
  • 7
  • 0
  • SQRT(-3)
  • π
  • 6.3
  • SQRT(3)
A

6.3

(ℚ is the set of rational numbers)

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

From the below options give examples of a member of set ℤ that is not a member of set ℕ

  • -3
  • 7
  • 0
  • SQRT(-3)
  • π
  • 6.3
  • SQRT(3)
A

–3

(ℤ is the set of integers, ℕ is the set of natural numbers)

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

From the below options give examples of an irrational number

  • -3
  • 7
  • 0
  • SQRT(-3)
  • π
  • 6.3
  • SQRT(3)
A

SQRT(3) or π

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

From the below options give examples of a number that is not in the set ℝ

  • -3
  • 7
  • 0
  • SQRT(-3)
  • π
  • 6.3
  • SQRT(3)
A

SQRT(–3)

(ℝ is the set of real numbers, including all natural numbers, integers, rational numbers and irrational numbers)

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

Define what is meant by a rational number

A

A number that can be represented as a fraction

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

Explain why all integers can be described as rational numbers

A

Any integer divided by 1 is equal to itself OR By example, e.g. 3/1=3

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

Explain why computer scientists often prefer to use hexidecimal representation instead of working with binary numbers

A
  • More compact to display.
  • Easier to understand/remember.
  • Less likely to make typing errors.
  • Saves time to write/type.

NB: Don’t allow ‘takes up less space’ – not clear that this refers to display space, hexadecimal does not save storage space

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

State the maximum number of unique values that can be stored using 3 bits

A

8

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

State the maximum number of unique values that can be stored using 1 nibble

A

16

(1 nibble = 4 bits)

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

State the maximum number of unique values that can be stored using 1 byte

A

256

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

State the value, in bytes, of 8 bits

A

1 byte

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

State the value, in bytes, of 1 kB

A

1000 bytes

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

State the value, in bytes, of 1 KiB

A

1024 bytes

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

State the value, in bytes, of 5.3 MB

A

5 300 000 bytes

OR

5.3 million bytes

OR

5.3 x 109 bytes

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

Add 0101 + 1010 (binary numbers) showing your working and where you have carried numbers

A

0 1 0 1

1 0 1 0 +

1 1 1 1

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

Add 1011 0101 + 0111 1101 (binary numbers) showing your wokring and where you have carried numbers

A

1 0 1 1 0 1 0 1

0 1 1 1 1 1 0 1 +

01 01 11 11 01 0 11 0

(1 mark per correct nibble – ignore a ninth ‘1’ on the far left)

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

ASCII is a 7-bit character set.

State the maximum number of unique characters that could be stored using ASCII

A

128

OR

27

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

State the maximum number of unique characters that could be stored using a 16-bit character set

A

65 536

OR

216

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

Suggest reasons why a larger character set might be chosen for a given application (3 marks)

A
  • To encode a wider range of alphabets OR specific examples, e.g. Japanese, Cantonese, Mandarin, Cyrillic.
  • To allow for including an increased range of non-alphabetic symbols (e.g. divide sign, sigma sign, copyright sign, emojis).
  • Improved portability/compatibility between systems OR a system might assume the wrong character set from a smaller encoding system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

A keyboard is used to transmit characters to a computer system using ASCII, in which the digit 0 is represented by 4810

Even parity is used with the most signficiant bit (the left-most bit) being used as the parity bit.

State the binary code that is transmitted when the user presses the key for the digit 0

A

0011 0000

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

A keyboard is used to transmit characters to a computer system using ASCII, in which the digit 0 is represented by 4810

Even parity is used with the most signficiant bit (the left-most bit) being used as the parity bit.

A key is typed and the bit pattern 1011 0011 is received. State whether the computer system will accept or reject this code and why

A

Rejected

Because the number of 1s is odd

(and the system is using even parity)

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

State reasons why parity bits are only partially effective at identifying transmission errors

A
  • If two (or more) errors occur then the parity check may be passed
  • Simple parity is not sufficient to correct the error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

A 4-bit binary message is transmitted from one computer system to another using majority voting.

The following code is received 001 111 110 000

State the original binary message

A

0110

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

Explain how majority voting is used to detect and correct errors in data transmission

A
  • Each bit is transmitted multiple times OR 3 times OR 5 times OR any odd number greater than 2
  • The receiver checks if all the bits are the same each time
  • If they are not then it assumes the value received the most times is correct
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Describe how a check digit could be used to detect and correct errors in data transmission

A
  • A calculation is performed using the bits that are to be sent OR a (single-digit) value is produced by an algorithm
  • When received, the same algorithm is used to calculate the check digit
  • If the digits match then the transmission is accepted OR if the digits don’t match then the transmission is rejected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Explain the difference between a checksum and a check digit

A
  • A check digit is exactly one digit in length
  • A checksum can be of any length
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

An image is stored as a bitmap graphics with pixel dimensions of 3000 px wide by 2000 px tall.

State the resolution of the image as a single number

A

6 000 000 pixels/6 million pixels

OR

6 megapixels

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

State the maximum number of unique colours that can be represented in an 8-bit image

A

256

or

28

30
Q

An image is stored as a bitmap with pixel dimensions of 3000 px wide by 2000 px tall. Each pixel is represented by an 8-digit binary number.

Excluding any metadata or compression, calculate the size of the image file

A

6 million pixels * 8 bits per pixel ÷ 8 bits per byte

(1 mark for any two parts applied correctly)

6 MB OR 6000 kB OR 6 000 000 bytes

NB: Only allow 1 mark if no working shown

31
Q

Suggest three pieces of metadata that may stored in an image file

A
  • Pixel dimensions
  • image height
  • image width
  • colour depth
  • colour palette
  • date the image was created
  • date last modified
  • date last opened
  • location (in the case of photographs)
  • file type
  • application used to edit
  • camera used
  • camera settings
  • facial recognition data (tagged person)
  • any other reasonable answer
32
Q

A bitmap image is made up of 12 different colours.

State the minimum colour depth for the image

A

4 OR 4 bits per pixel

33
Q

State three pieces of data that might be stored in a vector graphic file

A
  • Coordinates
  • edge thickness
  • edge colour
  • fill colour
  • edge style
  • fill style
  • object type
34
Q

State one common use of vector graphics and one common use for bitmap graphics

A
  • Vector
    • logo
    • clipart
    • font
    • cartoon
  • Bitmap
    • photograph
    • poster
    • flyer
    • any other suitable answer
35
Q

A researcher is recording a 30-second audio file that will be played to dogs, who can hear sounds up to 60 kHz

State the minimum sample rate that should be used for the audio file.

Justify the answer.

A

120 kHz

  • Nyquist’s theorem
  • the minimum sample rate should be at least double the maximum frequency to be recorded
36
Q

A researcher is recording a 30-second audio file at a sample rate of 100 kHz, with a depth of 12 bits per sample.

Calculate the file size of the recording.

A

100 000 samples per second * 30 seconds * 12 bits per sample ÷ 8 bits per byte

(1 mark for any three correct elements)

4.5 MB OR 4500 kB OR 4 500 000 bytes

NB: Only allow 1 mark if no working shown.

37
Q

Describe the impact on the quality and file size of an audio recording for chooding a bit depth of 24 bits per sample instead of 12 bits per sample

A
  • Quality: improved accuracy of the sounds
  • File size: doubled OR 2 x file size
38
Q

A musician is composing a new piece of music and is unsure whether to store it as a MIDI file or a samples audio file.

State three items of data that would be stored about each note in a MIDI file.

A
  • Channel
  • note-on/note-off
  • pitch/frequency/note number
  • volume
  • velocity
  • key pressure
  • duration
  • timbre
  • instrument
  • pedal effects
  • pitch bend
  • envelope
39
Q

Two sections of a DNA sequence are shown below.

TTTTTTTTAAAA CGTAACGTAACGT

Describe, with an example, how run length encoding (RLE) could be used to reduce the file size needed to store the first sequence.

A

Repeated values can be stated once

along with the number of times they are repeated

e.g. T8A4 OR 8T4A

40
Q

Two sections of a DNA sequence are shown below.

TTTTTTTTAAAA CGTAACGTAACGT

Describe how a dictionary could be used to reduce the file size needed to store the second sequence.

A

Repeated patterns can be stored in a dictionary (1)

and referred to by their index (1)

e.g. CGT : 1, AA: 2, Sequence: 12121 (1)

(Allow any sensible sequence.)

41
Q

Describe, with an example, one possible approach to cracking the Caesar cipher when given a ciphertext message but no key,

A
  • Point: brute force (1) Explain: try every possible combination as there are only 25. (1)
  • Point: frequency distribution (1) Explain: assume the most common letters in the ciphertext relate to the most common letters in plaintext, typically ‘e’, ‘t’, ‘a’
42
Q

State three requirements for the Vernam cipher key that are required to keep a plaintext message completely secure.

A
  • Key must be completely random.
  • Key must not be re-used OR can only be used once.
  • Key must not be shared.
43
Q

The Vernam cipher is an example of a symmetric key encryption. Explain what is meant by the term ‘symmetric key’.

A

The same key is used to encrypt and decrypt the ciphertext/plaintext

44
Q

Explain the purpose of ordinal numbers

A
  • To denote the order of a set of values
  • to denote the position or rank of each item
45
Q

Explain what is meant by a normalised floating point number

A

In a normalised floating point number the first two bits/most significant bits will be different

46
Q

Describe on advantage of sending a message using Unicode rather than ASCII

A

Unicode uses more bits per character OR uses 16 bits.

  • So more characters are available
  • can send messages that use characters beyond the basic Roman alphabet
  • can send messages in other languages
  • can send messages that use emojis
47
Q

A message isto be sent using ASCI but is also going to be encrypted.

State what is meant by encryption

A
  • A method of converting a plaintext message to a ciphertext message
  • altering a message so that it cannot be understood by unauthorised people/devices
48
Q

Explain why the Vernam cipher is considered more secure than the Caesar cipher (3 marks)

A

Indicative response

Brute force

The Caesar cipher uses one common key for all characters. It is trivially easy to try all 25 combinations of keys for a Caesar cipher and there are very few possible double-matches (where one ciphertext word could be converted to more than one plaintext word).

It is impossible to use a brute force approach to crack the Vernam cipher as each character uses a different key.

Frequency analysis

With the Caesar cipher, it is likely that the most commonly found characters in the ciphertext message will match the most commonly found characters in the language (e.g. ‘e’, ‘a’, ‘t’ in English). The letter ‘q’ in English is almost always followed by the letter ‘u’. As the same key is used throughout, once a match has been made for some letters, the entire message will be compromised.

With the Vernam cipher, each character is encrypted using a different key and therefore frequency analysis is unhelpful. Even if one or two characters could be cracked with confidence, this would give no clue to the remainder of the message.

Rules for key security

As long as the key is:

  • truly random
  • only used once (is at least as long as the message)
  • can be kept secret by both sender and receiver

then the encryption is mathematically secure and cannot be decrypted even given infinite time and infinite ciphertext, whereas this is not true of the Caesar cipher.

Level

Description

Marks

3

A line of reasoning has been followed to produce a coherent, relevant, substantiated and logically structured response. The response covers all areas indicated in the indicative response and there is sufficient detail to show that the student has an excellent level of understanding of the issues involved.

5–6

2

A line of reasoning has been followed to produce a coherent, relevant, substantiated and logically structured response but the response may only cover some of the areas indicated in the indicative response. A reasonable understanding is shown of each of these areas.

3–4

1

A few relevant points have been made but there is no evidence that a line of reasoning has been followed. The points may only relate to one of the areas from the indicative response or may be made in a superficial way with little substantiation.

1–2

49
Q

State what is meant by a pixel

A

The smallest addressable element of an image

50
Q

Describe two possible methods of lossy compression that could be applied to an image

A
  • Reducing the resolution/dimensions/pixel count of the image.
  • Using fewer pixels the file size can be reduced, but without lowering the quality so much that it becomes intrusive.
  • Reducing the colour depth/bit depth/number of colours.
  • By reducing the number of colours fewer bits will be needed to store the colour of each pixel.
51
Q

Explain how run length encoding could be used to reduce the file size of an image

A

A string of identically coloured pixels

could be stored by recording the number of pixels and then the colour.

(Allow demonstration by example, e.g. if there were 10 identical black pixels in row then storing ’10 ´ black’ is much shorter than storing black 10 times.)

52
Q

what is a natural number.

A

all positive integers including zero

53
Q

what the difference between Z and N(natural)

A

Z is a set of integers N is only a set of positive integers

54
Q

describe what is meant by a rational number

A

a number that can be represented as a fraction

55
Q

4 bit even parity for binary representation of 7

A

1111 number of ones is now even

56
Q

state two reasons why parity bits are only partially effective at identifying transmission errors

A
  1. if two or more errors occur then parity check may be passed
  2. simple parity is not efficient to correct the error
57
Q

explain how majority voting is used to detect and correct errors in transmission

A

each bit is transmitted and odd number of times greater than 2 the receiver check if all the bits are the same each time, otherwise it assumes the value received the most times is correct

58
Q

explain the difference between a check sum and a check digit

A

check digit is exactly one digit in length check sum is of any length

59
Q

describe how a check digit could be used to detect and correct errors

A

a calculation is performed using the bits that are to be sent and a value is produced. when received the same algorithm is used to calculate the check digit If the digits match then the transmission is accepted otherwise its rejected

60
Q

state three pieces of data that might be stored in a vector graphics file

A
  • coordinates
  • edge thickness
  • edge colour
  • fill colour
  • edge style
  • fill style
  • object type
61
Q

describe one common use of vector graphics

A
  • logo
  • clipart
  • font
  • cartoon
62
Q

describe one common use of bitmap graphics

A
  • photograph
  • poster
  • flyer
63
Q

give two examples of possible approaches to cracking a caesar cipher when given a ciphertext message but not a key

A
  1. brute force : try every combination as there’s only 25 letters
  2. frequency distribution : assume most frequent letters in cipher text relate to most common letters in plaintext
64
Q

What logic operation is used to encrypt plaintext using vernal cipher

A

XOR

65
Q

State three requirements for the vernal cipher key that are required to keep the plaintext message completely secure

A
  1. key must be completely random
  2. key must not be re-used or can only be used once
  3. key must not be shared
66
Q

describe one advantage of sending a message using Unicode rather than ASCII

A
  • more bits per character
  • 16 bits so more characters are available
  • you can use characters beyond the Roman alphabet
  • can send messages in other languages
  • can send messages using emojis
67
Q

State what is meant by encryption

A

a method o converting a plaintext message to a cipher text message OR altering a message so that it cannot be understood by unauthorised people/devices

68
Q

state what is meant by a pixel

A

the smallest addressable element of an image

69
Q

describe two possible methods of lossy compression that could be applies to an image

A
  1. reducing the resolution/dimensions/pixel count using fewer pixels the file size can be reduced but without lowering gate quality so much that it becomes intrusive
  2. reducing bit depth/colour depth/no. of colours by reducing the number of colours fewer bits will be needed to store the colour of each pixel
70
Q

Describe how a vector graphic is represented. [1 mark]

A

a vector graphic system represents an image as a set of objects and that properties of these objects are be stored in a file.

71
Q

Describe how a black rectangle would be represented in a vector graphics file [2 marks]

A

A property of the black rectangle is given; eg

 fill colour

 outline/edge colour

 x coordinate of a specific point eg top right-hand corner

 y coordinate of a specific point eg top right-hand corner

 outline/edge width

 width

 height
A. if a property is given without it being directly related to the black rectangle.
A. coordinates of a specific point eg top right-hand corner for one mark only if x and y not referenced
R. properties that are too vague eg position, colour, coordinates (without further explanation), points (without reference to coordinates)

72
Q

Explain what would be the consequence of using run length encoding on an image that compresses poorly [1 mark]

A

adding the run lengths into the image representation might counter any memory savings if there is never a significant ‘run’.