Fundamentals of data representation

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Get a hint
Hint

what are natural numbers (set N)

Get a hint
Hint

a set of numbers containing all positive whole numbers and zero

Get a hint
Hint

what are Integer numbers (set Z)

Get a hint
Hint

a set of whole numbers both positive and negative
Including zero

Card Sorting

1/49

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

50 Terms

1
New cards

what are natural numbers (set N)

a set of numbers containing all positive whole numbers and zero

2
New cards

what are Integer numbers (set Z)

a set of whole numbers both positive and negative
Including zero

3
New cards

what are Rational numbers (set Q)

A set of numbers that can be represented as a fraction or decimal
It can be both positive and negative

4
New cards

what are irrational numbers

numbers which cannot be written as a fraction e.g. route 2 or pie

5
New cards

what are Real numbers (set R)

All positive real world quantities, includes all of Rational, integer, irrational and natural

6
New cards

what are ordinal numbers

numbers which describe the numerical positions of objects in relation to another e.g. 1st, 2nd, 3rd

7
New cards

how can a bit be represented?

A bit can be represented with either 1 or 0 which can be represented by computers interpreting high or low currents

8
New cards

all Binary prefixes:

Binary prefixes ( 2)
Kibi = 2^10
Mebi = 2^20
Gigi = 2^30
Tebi = 2^40

9
New cards

all decimal prefixes

Decimal prefixes (10)
Kilo = 10^3
Mega = 10^6
Giga = 10^9
Tera = 10^12

10
New cards

What is the difference between unsigned and signed binary

Unsigned binary can only represent positive numbers.

Signed binary can also represent negative numbers as well as positive.

11
New cards

How does two's complement work?

Signed binary with twos compliment:

Allows for the representation of of both positive and negative numbers in binary

When using two's compliment the most significant bit of a number becomes negative and you add up all the less significant bits to get your negative number

Subtraction with twos compliment:

You can subtract numbers by making the second number negative and then adding it after e.g. 14 + (-8)

12
New cards

what is Fixed point and Floating point?

Fixed point binary:

The binary point doesn't move and a specified amount of bits are placed before and after the point

Floating point binary:

Contains a mantissa and an exponent e.g. 3.1x10^6 where 3.1 is the mantissa and 6 is the exponent (written in binary)

13
New cards

what are rounding errors?

some decimal numbers that cannot be represented exactly in binary even with the use of fixed or floating point notation.

We can calculate the absolute and relative errors to see how close a particular number is to an actual value

14
New cards

what is an absolute error?

An absolute error is the actual amount by which a value is inaccurate.
It is the difference between the intended number and the approximation.

15
New cards

what is an relative error?

A relative error is the measure of uncertainty in a given value compared to the actual value which is relative to the given size of the given value.
it is calculated by dividing the absolute error by the actual value (and x by 100 if a percentage is required)

16
New cards

Advantage/ disadvantages of floating point:

Floating point allows for the representation of a greater range of numbers with a given number of bits than fixed point, this is because floating point can take advantage of an exponent that is either positive or negative

A large exponent and small mantissa = large range but little precision
A small exponent and large mantissa = small range but good precision

17
New cards

Advantage/ disadvantage of fixed point:

A binary point close to the left = good precision but small range
A binary point close to the right = large range but little precision

18
New cards

What is floating point normalization?

Floating point numbers are normalized to provide the maximum level of precision for a given number of bits.

It involves ensuring that the floating point starts with 01(for positive) and 10(for negative)

19
New cards

what is underflow and overflow?

Underflow occurs when very small numbers are to be represented but there are not enough bits available

Overflow occurs when a number is too large to be represented with the available bits
This is important for signed binary

20
New cards

What is ASCII?

In ASCII, the symbols assigned to the characters are assigned different 7 bit binary codes

Extended ASCII uses 8 bits therefore can represent 256 characters

1 byte can represent 256 different characters

21
New cards

What is Unicode?

Nowadays Unicode is also used as it counters all the different languages in the world

It uses 16 bits to represent characters

22
New cards

What are parity bits? (error checking)

adding a single bit to a transmission that can be used to check for errors

It contains:

- even parity, the value of the parity bit is chosen so as to make the total number of 1s in the transmitted data even. For example, if the data 01101110 (which contains 5 1s) were to be t transmitted, the parity bit would be set to 1, so that the total number of 1s is even. (11101110)

- Odd parity - works in a similar way to even parity, but adds a parity bit so that the total number of 1s in the transmitted data is odd.

- when data is received a parity check is carried out. If the value of the received parity bit confirms the type of parity (odd or even) in use, then the received data will be treated as correct. Otherwise the data is re-transmitted

- however, parity bits are not good for long distances, further checking needs to be applied

23
New cards

what is majority voting? (error checking and correction)

each bit of the data is transmitted multiple times. When the data is received, the most commonly occurring value is taken to be correct.

No need for retransmission as it is already performed
However, the volume of data being transmitted is increased with the repetition of bits ~ inefficient
Does not guarantee absolute reliability

24
New cards

what are check sums? (error checking)

Checksums involve adding a value determined by the data itself to the transmitted data.

An algorithm is used to determine the value of a check sum based on the data being transmitted.

not very efficient if the algorithm is complex

25
New cards

What are check digits? (error checking)

A check digit is a type of check sum which only a single digit is added to the transmitted data

This reduces the number of different algorithms that could be used to calculate the value of the check digit and so reduces the variety of errors the system can detect.

It is not necessary to recalculate the check digit again hence more efficient than check digits

26
New cards

how are bitmap graphics represented?

an image is broken down into pixels, each of which has a binary value assigned to it.

The resolution of an image is often expressed as the no of pixels per inch or the length X the width.

The value assigned to a pixel determines the color of the pixel

27
New cards

What is color depth/bit depth?

no of bits assigned to a pixel

e.g. if 2 bits were used then then there will be 2^2 (4) different colors that can be represented

28
New cards

how to calculate file size of an image

you multiply the no of pixels (width x height) by the bit depth/ color depth

It is represented in bits

This method of calculating produces a minimum value. This is because bitmap image files contain metadata( width, height, data created, color depth)

29
New cards

how are vector graphics represented?

Vector graphics represent objects and shapes such as rectangles, circles and lines.
The properties (such as fill color, fill style, and dimensions) of each geometric object or shape are stored in a drawing list

30
New cards

Advantage and disadvantage of vector graphics

advantage:

Vector graphics use shapes rather than pixels meaning they can be enlarged without losing quality.

Vector graphics use less storage space than bitmapped graphics as info is stored for each shape rather than each pixel

disadvantage:

Not efficient for an image of varying colors
Individual pixels cannot be changed

31
New cards

Advantage and disadvantage of bitmapped graphics

advantage:

Great format for storing full color images taken on a phone or digital camera

Photos can be adjusted and altered

disadvantage:

Enlarging a bitmapped Image results in a blurry or even pixelated image

Takes up more memory and storage

32
New cards

analogue vs digital sound

Analogue data has no limits to the values it can take, in contrast, digital data can only take particular values.

Analogue and digital signals vary in a similar way. An analogue signal can take any values and can change as much as required whereas a digital signal must take a specified range of values and can only change at specific intervals.

33
New cards

how does a digital to analogue conversion work?

The device reads a bit pattern representing an analogue signal and outputs an analogue electrical current.

34
New cards

how does an analogue to digital conversion work?

When a computer needs to make use of analogue sensors (e.g. a microphone), they use an analogue to digital converter (ADC)
It works by taking a reading of an analogue signal at regular intervals and recording the value through sampling

Samples are taken at a specific frequency which determines the number of samples taken per second.
Once the value of the analogue signal has been recorded, it can be stored digitally as a bit pattern.

35
New cards

what is the sampling rate?

the number of samples taken per second

36
New cards

what is the sampling resolution?

The number of bits allocated to each sample

37
New cards

How can the size of a sound file be calculated?

duration of the sample in seconds X the sampling
rate in hertz X the sample resolution in bits

38
New cards

What is the Nyquist Theorem?

the sampling rate of a digital audio must be at least twice the frequency of the sound. If the sampling rate is below this, the sound may not be accurately represented.

39
New cards

What is MIDI?

stores sound as a series of event messages, each of which represents an event in a piece of music.

These can be thought as a series of instructions which could be used to create a piece of music

40
New cards

what can event messages contain?

could contain info such as:
duration of the note

Type of instrument used to play the note

Volume of instrument

If the note should be sustained

41
New cards

Advantages and disadvantages of MIDI:

advantages:
allows for allows for easy manipulation of music without the loss in quality

The instruments on which note sounds can be changed, notes can be transposed and the duration of the notes can be altered

is lossless and smaller in size than sampled audio files

disadvantages:

It can't be used for storing speech and sometimes results in a less realistic sound

42
New cards

why are files compressed?

Files are compressed to reduce their size

Smaller files are faster to transfer between storage devices or on the internet

43
New cards

What is lossy compression?

Some information is lost in reducing the file size.

44
New cards

What is lossless compression?

No loss of information

the size of an file can be reduced without decreasing its quality

The two methods of lossless compression are run length encoding and dictionary methods

45
New cards

What is run length encoding?

Run length encoding reduces the the size of the file by removing repeated info
and replacing it with one occurrence of the repeated information
followed by the number of times it is to be repeated

46
New cards

what are dictionary based methods?

a dictionary containing repeated data is appended to the file.

This method results in a significant reduction in size.

However the dictionary used to compress the data also has to be in the file, therefore increasing file size.

47
New cards

Lossy vs. Lossless

Lossy compression:

Some info is lost in the compression process
Quality of file is reduced
The extent to which the file can be reduced is not limited

Lossless compression:

No loss of info
No loss of quality
There is a limit to how much of a file can be compressed

48
New cards

what are ceaser cyphers and their variants?

Caesar ciphers encrypt information by replacing characters.

Shift ciphers:

All the letters in the alphabet are shifted by the same amount
The amount by which characters are shifted forms the key

Substitution ciphers:

They are a type of Caesar cipher where letters are randomly replaced

49
New cards

What is an Vernam cypher?

an example of a cipher where each key can only be used once.

It works by:
1) Aligning the characters of the plaintext and the key
2) Converting each character to binary (using ascii or Unicode)
3) applying a XOR operation to the two bit patterns
4) converting the result back to a character

50
New cards

Vernam vs ceaser cypher, pros and cons:

Since the key of the Vernam cipher is chosen at random, the cipher text is also random and the cipher is considered very secure.

The Vernam cipher is not crackable within a recent timeframe given current computing power. Ciphers that use this form of security are said to rely on computational security.

The ceaser cypher can be easily cracked due to reoccuing letters where "E" is said to be the most common letter in words.