Data Representation Flashcards

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

What are the different number bases?

A

Natural, integer, rational, irrational, real, ordinal

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

What numbers and what is the symbol for natural numbers?

A

N = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, …}

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

What numbers and what is the symbol for integer numbers?

A

Z = { …, -2, -1, 0, 1, 2, 3, …}

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

What numbers and what is the symbol for rational numbers?

A

Q = a number that can be represented by a ratio of two numbers. E.g. 3/2

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

What are irrational numbers?

A

An irrational number is a number that cannot be represented by a ratio of integers e.g. π.

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

What are real numbers?

A

A real number is any positive or negative value and can include a fractional part.

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

What are ordinal numbers and what is the symbol for them?

A

Ordinal number asre those that identify the position of something within a list.
S = { “Anne”, “Asif”, “John”, …}

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

What are Natural numbers?

A

Natural numbers are the most recognisable type of number as they are the numbers that we use every day for counting and ordering. They are typically made up of decimal numbers.

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

What are integer numbers?

A

An integer number is a whole number whose value can be positive or negative. ( Zero is counted)

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

What are rational numbers?

A

A rational number is a number that can be represented as a fraction.

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

What are some uses of natural numbers in programming?

A

A counter of number of things in stock, score in video game etc, keep track of next instruction, identify next location of data, a counter for how many times a loop statement.

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

The use of real numbers in programming?

A

CNC machines need lots of accuracy to the millimeter, microwave cookers control and measure both time and temperature, power stations use data control systems to optimise production, robotic engineers use real time measurement of the environment in which the robot is working.

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

What is a bit?

A

A bit is a binary digit. It can hold the values of 1 or 0.

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

What is a byte

A

A byte is 8 bits. This is where we begin to measure the size of memory or disk space in terms of megabytes gigabytes and terabytes.

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

What is the difference between kibi bytes and kilo bytes? (And the rest of them)

A

Kibi (mebi Gigi tebi) is measured in binary therefore a kibibyte is 2^10. And a kilobyte is measured in decimal therefore 10^3

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

What are the three number bases we look at?

A

Base 10 - decimal
Base 2 - binary
Base 16 - hexadecimal

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

What are the uses of hexadecimal?

A
  • Hex is used for, representing large digits with fewer digits
  • Hex is used for, representing colour
  • Hex is used for, Mac addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is main advantage of Hex?

A

With 2 hex digits represents one byte. It is often referred to as shorthand for binary.

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

What is two’s compliment?

A

Two’s compliment is a method used to represent signed integer values. This means they can represent both positives and negatives.

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

What does two’s compliment do?

A

It makes the msb negative. Eg in 8 bit binary the msb with twos compliment the msb becomes -128.

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

To convert a negative integer into a binary you must? (Using two’s compliment)

A

For example to covert -102 to binary you:
First write out +102: 01100110
Then starting at the lsb write out the number until you reach the first 1.
Then reverse all the remaining bits.
So -102 is:
10011010

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

What is a fixed point number?

A

A fixed point member is a binary number that has decimal places.

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

What is a fixed point number?

A

A fixed point member is a binary number that has decimal places.

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

What is a floating point number?

A

A floating point number is a decimal number that’s decimal point can float up and down the binary string to help represent more numbers.

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

What does a floating point number consist of?

A

It has a mantissa and the exponent.
E.g
450 000 000 000 = 4.5×10^11
4.5 is the mantissa
And 11 is the exponent meaning that the decimal moves 11 places to the right.

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

What is the benefits of fixed point over floating?

A

-The values are handled in the same way as decimal values, so any hardware made to work with integers can work with this.
- The absolute error will be the same this means that precision is retained.
-It is suited to applications where speed is more important
- It is suited to appliances that need absolute level of precision

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

What are the benefits of floating point over fixed point?

A

A much wider range of numbers can be produced with the same number of bits

Consequently floating point lends itself to applications where a wide range of values may need to be represented.

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

What is normalisation?

A

Normalisation is a technique used to ensure that when numbers are represented they are as precise as possible.

29
Q

How do you normalise a binary number?

A

For example: the binary number 01101100 normalised would be 0.1101100 the binary point would have moved back 7 points meaning that the exponent is 7. 0111 therefore the normalised rep of 108 is 0.110110001111

30
Q

What is a rounding error?

A

When working with decimal numbers we are used to rounding numbers up or down. As a consequence we get rounding errors.

31
Q

What are absolute and relative errors?

A

The absolute error is the mathematical difference between the answer and the approximation.
Relative errors are the absolute error divided by the number intended to be stored.
Absolute error ÷ number intended

32
Q

What is ASCII?

A

ASCII used to be the standard that was agreed to cover all keyboard characters. It was later changed to extended ASCII (8 bits instead of 7).

33
Q

What are the problems with ASCII?

A

The main problems with ASCII are that:
- 256 characters is still not sufficient to represent all the possible characters
- It was initially developed in English and therefore did not represent other languages
- the range of platforms and programs has increased massively with developers from around the world who use a much larger ranger of characters

34
Q

What is Unicode?

A

Unicode was a new standard created which follows the same basics as ASCII in that it has a unique 8 bit code for every character on a standard English keyboard. But Unicode also includes for over 20 countries.

35
Q

What type of encoding does Unicode use? (UTF what?)

A

UTF 8 and 16. UTF 16 udes 16 bit codes

36
Q

How did Unicode allow itself to be implemented easier?

A

Unicode used ASCII so that older platforms could handle it. Unicode aims to cover every platform in terms of hardware and operating systems, every foreign language and every platform.

37
Q

What is a parity bit?

A

A parity bit is a method of detecting errors in data during transmission.

38
Q

How do parity bits work?

A

They look at the amount of 1s in the bit string.
Even parity:
If the amount of 1s is odd then the bits is a 1
Odd:
If the amount of 1s is even then the bit is set as 1 so the amount of 1s is odd.

39
Q

How does majority voting work and what is it?

A

Majority voting is where each bit is sent 3 times to reduce errors. Eg the binary string 101 would be sent as 111000111. It is another way of checking for errors.

40
Q

Using majority voting what should the bit pattern 101000100111 be when made smaller?

A

1001

41
Q

What are check digits?

A

Check digits are another common way of checking data. They are used on barcodes in super markets. Like a parity bit they are used to check for errors

42
Q

How do check digits work?

A

Original number - 2 3 0 4 5
Weighting. - 6 5 4 6 2
Multiply by weight and add together
= 49
Divide by 11 = 4 remainder 5
Subtract the remainder from 11
11 - 5 = 6
Do check digit is 6

43
Q

What are bit mapped graphics?

A

Bit mapped graphics are how images are stored on a computer. They are mad up of pixels.

44
Q

What is the equation for resolution and what is resolution (images?)

A

Resolution=width * hight

Resolution is the amount of pixels by pixels.
Eg 10*10 resolution would be 10 pixels by 10 pixels

45
Q

What is the equation for resolution and what is resolution (images?)

A

Resolution=width * hight

Resolution is the amount of pixels by pixels.
Eg 10*10 resolution would be 10 pixels by 10 pixels

46
Q

What is colour depth, and the equation for it?

A

Colour depth is the amount of different colours.
The equation is 2^n ( n= the amount of bits)

47
Q

How do you calculate how much storage is taken up by an image?

A

Storage = colour depth * resolution

48
Q

What is an ADC? Also what is a DAC? What are they used for?

A

ADC is analogue to digital conversion
DAC is digital to analogue conversion
They are used to convert between analogue and digital sounds. A MIDI device would be plugged into the computer and then the pc could record the sound from it.

49
Q

What do ADC AND DAC do?

A

ADC converts sound from an anolouge sound to a digitally stored one. Eg a microphone.
A DAC does the reverse. Eg a speaker.

50
Q

What are the advantages of MIDI?

A

Files are smaller

Completely editable files

Supports a wide range of instruments

Produce high quality sound

51
Q

What is sampling?

A

Sampling is the process of converting analogue sound waves into digital from to create what id commonly known as ADC conversion.
To make a more accurate sound increase the sampling rate.

52
Q

How do you calculate the size of an audio file?

A

Sample rate * length of recording (seconds) * sampling resolution (bits)

53
Q

What is compression and whatt are the two examples of it?

A

Compression is the process of encoding information with fewer bits so it takes up less space.

Lossy compression is where when restored the file won’t be the same.
Lossless compression is where when restored the film will be the exact same.

54
Q

What are some examples of lossless compression?

A

RLE and dictionary based compression

55
Q

What are some examples of lossless compression?

A

RLE and dictionary based compression

56
Q

What is RLE?

A

RLE is run length encoding. It is a compression method where data is eliminated if it is repeated. For example if you tried to compress RRRRR using RLE it would become R5

57
Q

What is dictionary based compression?

A

Dictionary based compression is where a program references a dictionary in correlation to a x (page) and a y ( num on Page) value

58
Q

What is dictionary based compression?

A

Dictionary based compression is where a program references a dictionary in correlation to a x and a y value

59
Q

What is lossy compression?

A

Lossy compression is well when an image or a sound is stored it is compressed then when trying to return it to its normal size it will have lost some of the original. Eg not as good quality XX

60
Q

How do all ciphers work?

A

They work by turning plaintext into ciphertext.

61
Q

What is plaintext and ciphertext?

A

Plaintext is data in human readable form
Ciphertext is data that has been encrypted.

62
Q

What are the ciphers we study?

A

Vernam cipher, Caesar Cipher, and the transportation cipher.

63
Q

What is the Caesar Cipher?

A

The Caesar Cipher, is a substitution cipher, this method substitutes each letter of the alphabet for another character by simply shifting the letters forwards or backwards.

64
Q

What is a polyalphabetic?

A

A polyalphabetic is where you use more than one alphabet.

65
Q

What is frequency analysis?

A

Frequency analysis is where you look at the letters and count them. In English the most used letter is “e” therefore if we find a lot of a certain letter in cipher text, we might be able to assume it’s “e”

66
Q

What is the transposition cipher?

A

The transportation cipher I’d where all the letters are rearranged to make an anagram.

67
Q

What is the Vernam cipher?

A

The Vernam cipher (one time pad) is the only cipher that is unbreakable under certain conditions. The key for the Vernam Cipher should be the same length or longer then the plaintext your trying to encrypt.

68
Q

What are the conditions needed to make the Vernam Cipher unbreakable?

A

The encryption key must be equal or longer then the plaintext

The key must be truly random

The key is only used once and then destroyed (the key must be given in person to the person who is trying to decrypt the message)