3.5 data representation Flashcards

1
Q

natural numbers set

A
  • symbol N
  • integer
  • positive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

integers set

A
  • symbol Z
  • positive and negative
  • cannot be fractional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

real numbers set

A
  • symbol R
  • positive and negative
  • irrational, fractional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

rational numbers set

A
  • symbol Q
  • can be represented as fractions
  • positive and negative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

irrational numbers set

A
  • no specific symbol
  • cannot be represented as fractions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ordinal numbers

A
  • natural number that describes the numerical position of a value
  • used for ordering
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

why hexadecimal used

A
  • more compact when displayed
  • easier for people to remember
  • lower likelihood of error when typing in data
  • saves programmer time writing in data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

kibi, Ki

A

2^10 (1024) bits, kilobytes (10^3) but accurate

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

mebi, Mi

A

2^20, megabytes (10^6) but accurate

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

gibi, Gi

A

2^30, gigabytes (10^9) but accurate

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

tebi, Ti

A

2^40, terabytes (10^12) but accurate

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

unsigned binary

A
  • positive integers
  • min and max values for n bits are 0 and (2^n) - 1 respectively
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

signed binary

A
  • negative (and positive) integers
  • range of integers that can be represented by two’s complement -2^(n-1) to + (2^(n-1)-1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

practice two’s complement representation of signed integers

A
  • most significant bit (leftmost) has a place value of -2^(n-1), where n is the number of bits
  • for pos numbers, left bit has to be 0
  • for neg numbers, left bit has to be 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

find negative equivalent of a positive number in two’s complement

A
  • flip the bits and add 1 (literally 1. rightmost bit)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

why was unicode introduced

A
  • support a larger range of chars
  • to facilitate communication / text in different languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

analogue data

A
  • continuous
  • no limits to values data can take
    can change as freq. as required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

analogue signal

A

consists of a continuously variable voltage

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

digital data

A
  • discrete
  • can only take specified range of values
  • can only change value at specified intervals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

digital signal

A

representation of discrete values over time

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

digital to analogue converter

A
  • reads bit pattern representing an analogue signal
  • outputs an alternating, analogue, electrical current
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

analogue to digital converter

A
  • analogue signal sampled at regular time intervals
  • amplitude of wave at each interval measured
  • measurement coded into fixed num of bits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

sampling

A
  • taking measurements of the level of the analogue signal (amplitude) at regular time intervals
  • measurements assigned a binary pattern, stored in memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

sampling rate

A
  • number of samples taken per second, measured in Hz (1Hz equal to 1 sample p/s)
  • higher sampling rate = better quality of audio recording, as well as bigger file size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

sample resolution

A
  • number of bits (audio bit depth) used to represent each sample
  • determines number of digital values that can be used during sampling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

nyquist theorem equation

A

sampling rate ≥ 2fmax

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

ideal nyquist theorem answer

A
  • to faithfully recreate analogue signal, sample rate at least 2x highest frequency of og sound
  • i.e., a sound with freq. of 10kHz must be sampled at min of 20kHz in order to reproduce original​
  • reason for doubling to ensure sample covers complete range of peaks + troughs in analogue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

MIDI file

A

consists of a list of event messages that explains
- what notes must be played
- when they should be played
- how long or loud each note should be
files do not store a digital representation of analogue sound, instead hold signals used to produce sound

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

MIDI (musical instrument digital interface) standard

A

creates sounds as requested either from instrument or piece of software, not live but synthesized sound

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

MIDI benefits

A
  • significantly reduces amount of data transferred / more compact representation
  • event messages can synchronize tempo, control pitch, change volume etc.
  • no data lost about musical notes
31
Q

pixels and colour depth

A
  • picture element
  • colour depth is number of bits assigned to a pixel in an image
  • each value represents diff colour
  • colour depth works through powers of 2
32
Q

bitmap images and the con

A

image broken down into pixels, each of which has assigned binary value, enlarging results in blurry pixelated image

33
Q

calculating image file size…

A

…produces minimum value / base file size, bitmap image files may also contain metadata which adds to file size

34
Q

vector graphics and their benefits

A
  • represent images using geometric objects and shapes
  • properties of each shape / object stored in a list
  • can be scaled without losing quality
  • well suited to simple images which use shapes
  • use less storage space
35
Q

capturing an image

A
  • light sensor measures intensity of colour in each pixel
  • each measurement converted into binary code using ADC
  • image analysed to identify runs / sequences of the same colour / value
  • num of pixels recorded in the grid affects num. of bits used and therefore file size
36
Q

sensing colour

A
  • red/green/blue filters used with different sensors in camera to separate out these wavelengths
  • intensity of colours falling on sensors is measured and stored to aggregate an RGB value
37
Q

benefits of compressing data

A
  • faster data transfer times
  • less bandwidth used as transfer limits may apply
  • buffering on audio/video streams less common
  • less storage required
38
Q

lossy compression

A

some info lost permanently, through reducing image res or lowering sample res of audio file

39
Q

common lossy compression formats

A

mp3, jpeg

40
Q

lossless compression

A

no loss of info, file size reduced without decreasing quality, patterns in data spotted + recorded instead of data itself, some limit to how much a file can be compressed

41
Q

common lossless compression formats

A

png, zip

42
Q

benefits of lossless compression

A
  • file can be reproduced exactly as it was originally
  • lossless data compression can be reversed
43
Q

run length encoding

A

compresses and summarises data by collecting identical, consecutively-occuring binary runs by their binary value, followed by the amount of times they occur

44
Q

rle - image

A
  • image analysed to identify sequences of the same colour/value
  • the colours/values and counts of run-lengths are stored
45
Q

rle - sound

A

same sound or note played for fraction of a second could result in hundreds of identical samples, rle records one example of the sample + how many times it consecutively repeats

46
Q

dictionary compression

A

dictionary containing records of repeated data appended to the file, order in which data recorded using the binary values in order of amount of instances in file, best used with large amounts of data as dictionary has to be in file

47
Q

encryption

A

using an algorithm to convert a message into a form that is no understandable without the key to decrypt it

48
Q

plaintext

A

unencrypted info

49
Q

ciphertext

A

encrypted info

50
Q

what must be known to decrypt ciphertext

A

encryption method used + key used to encrypt

51
Q

caesar ciphers

A

encrypt info by replacing characters - one character always replaced by same character

52
Q

shift cipher

A

all letters in alphabet shifted by same amount - amount shifted forms the key

53
Q

substitution cipher

A

letters randomly replaced

54
Q

caesar cipher effectiveness

A

can be easily cracked, freq. at which characters occur can be a clue to which they actually are

55
Q

brute force attack

A

attempts to apply every possible key to decrypt ciphertext until one works

56
Q

vernam cipher

A

one-time pad cipher, requires key to be random + at least as long as the plaintext to be encrypted

57
Q

how does vernam cipher work

A
  1. aligning characters of the plaintext + the key
  2. converting each char. to binary (using an info coding system)
  3. applying logical XOR operation to the 2 bit patterns
  4. convert result back to a character
58
Q

vernam cipher benefits

A

!!- frequency / statistical analysis of ciphertext reveals nothing about plaintext!!
- if implemented correctly, unbreakable (caesar cipher can be easily cracked)
- more possible keys

59
Q

one-time pad

A

generated from physical/unpredictable phenomenon, like atmospheric noise or radioactive decay

60
Q

when is error checking used

A

during data transmission

61
Q

parity bit

A
  • single bit added (as least or most significant bit) to a byte
  • set to make total number of 1s in accordance to odd or even parity
  • sender says what type of parity is used along with the transmitted data
62
Q

even parity / odd parity

A

even parity - parity bit makes total num of 1s in data even

63
Q

how does receiver perform error detection on received byte (even parity)

A
  • if number of 1s in byte even, data (assumed to have been) received correctly / has not been corrupted
  • if number of 1s in byte odd, data corrupted / incorrect
64
Q

problems with parity bits

A
  • may miss errors if an even number of bits are corrupted
  • parity bits can only detect errors, not correct them
65
Q

why might there be transmission errors when transmitting data?

A
  • electrical interference
  • power surges
  • physical disruption / distortion
66
Q

majority voting

A
  • every bit transmitted multiple times (odd amount of times so not having to randomly decide which is correct)
  • most commonly occurring value taken as correct when data received
67
Q

why use majority voting

A
  • can detect multiple errors
  • more efficient at detecting errors (as parity bit system may miss errors if even number of bits corrupted)
  • can identify as well as correct most errors that occur in transmission, due to the majority bits being taken as the correct value
68
Q

problem with majority voting

A

volume of data transmitted increased = significantly increased transmission time

69
Q

checksum

A
  • piece of data added to a block of data to enable error detection
70
Q

how do checksums work

A
  • produced by applying checksum algo to a block of data
  • checksum algo returns a value (the checksum)
  • checksum transmitted with the data
  • receiver recalculates the checksum from received data using same algo, compares values
71
Q

check digit

A

a digit calculated (using an algorithm); from the other digits/letters (in the input sequence);

72
Q

main purpose of check digits

A
  • recognise and prevent human errors when entering or assigning identification numbers
73
Q

why are messages encrypted

A
  • prevent unauthorized users understanding intercepted data
  • prevent message alteration; identify authentic users