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
sample resolution
- number of bits (audio bit depth) used to represent each sample - determines number of digital values that can be used during sampling
26
nyquist theorem equation
sampling rate ≥ 2fmax
27
ideal nyquist theorem answer
- 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
28
MIDI file
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
29
MIDI (musical instrument digital interface) standard
creates sounds as requested either from instrument or piece of software, not live but synthesized sound
30
MIDI benefits
- 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
pixels and colour depth
- 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
bitmap images and the con
image broken down into pixels, each of which has assigned binary value, enlarging results in blurry pixelated image
33
calculating image file size...
...produces minimum value / base file size, bitmap image files may also contain metadata which adds to file size
34
vector graphics and their benefits
- 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
capturing an image
- 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
sensing colour
- 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
benefits of compressing data
- faster data transfer times - less bandwidth used as transfer limits may apply - buffering on audio/video streams less common - less storage required
38
lossy compression
some info lost permanently, through reducing image res or lowering sample res of audio file
39
common lossy compression formats
mp3, jpeg
40
lossless compression
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
common lossless compression formats
png, zip
42
benefits of lossless compression
- file can be reproduced exactly as it was originally - lossless data compression can be reversed
43
run length encoding
compresses and summarises data by collecting identical, consecutively-occuring binary runs by their binary value, followed by the amount of times they occur
44
rle - image
- image analysed to identify sequences of the same colour/value - the colours/values and counts of run-lengths are stored
45
rle - sound
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
dictionary compression
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
encryption
using an algorithm to convert a message into a form that is no understandable without the key to decrypt it
48
plaintext
unencrypted info
49
ciphertext
encrypted info
50
what must be known to decrypt ciphertext
encryption method used + key used to encrypt
51
caesar ciphers
encrypt info by replacing characters - one character always replaced by same character
52
shift cipher
all letters in alphabet shifted by same amount - amount shifted forms the key
53
substitution cipher
letters randomly replaced
54
caesar cipher effectiveness
can be easily cracked, freq. at which characters occur can be a clue to which they actually are
55
brute force attack
attempts to apply every possible key to decrypt ciphertext until one works
56
vernam cipher
one-time pad cipher, requires key to be random + at least as long as the plaintext to be encrypted
57
how does vernam cipher work
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
vernam cipher benefits
!!- frequency / statistical analysis of ciphertext reveals nothing about plaintext!! - if implemented correctly, unbreakable (caesar cipher can be easily cracked) - more possible keys
59
one-time pad
generated from physical/unpredictable phenomenon, like atmospheric noise or radioactive decay
60
when is error checking used
during data transmission
61
parity bit
- 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
even parity / odd parity
even parity - parity bit makes total num of 1s in data even
63
how does receiver perform error detection on received byte (even parity)
- 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
problems with parity bits
- may miss errors if an even number of bits are corrupted - parity bits can only detect errors, not correct them
65
why might there be transmission errors when transmitting data?
- electrical interference - power surges - physical disruption / distortion
66
majority voting
- 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
why use majority voting
- 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
problem with majority voting
volume of data transmitted increased = significantly increased transmission time
69
checksum
- piece of data added to a block of data to enable error detection
70
how do checksums work
- 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
check digit
a digit calculated (using an algorithm); from the other digits/letters (in the input sequence);
72
main purpose of check digits
- recognise and prevent human errors when entering or assigning identification numbers
73
why are messages encrypted
- prevent unauthorized users understanding intercepted data - prevent message alteration; identify authentic users