Data Representation Flashcards

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

What are natural numbers?

A

Natural numbers are position-only integers: N = {0, 1, 2, 3…}

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

What are integers?

A

Integers are numbers that can be expressed without a decimal component. These are inclusive of negative numbers and zero: Z = {….., -2, -1, 0, 1, 2…}

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

What are rational numbers?

A

Rational numbers are those that can be expressed as a fraction. This means that all integers are rational numbers. Q = {… 0.5, 1, 1.5…}

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

What are irrational numbers?

A

Irrational numbers are those that cannot be written as a fraction.

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

What are real numbers?

A

Real numbers encompass all of the numbers sets as a set of all possible real-world quantities.
R = {N, Z, Q}

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

What are ordinal numbers?

A

Ordinal numbers are numerical values that hold the position of an object when it is placed in an order.

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

What is decimal?

A

Denary is represented using powers of 10 for each position of the number. It has the radix of 10.

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

What is binary?

A

Binary representations are made up of groups of bits to convey a value using a series of 1s and 0s. Binary is represented as powers of 2.

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

What is hexadecimal?

A

This system uses 16 digits, there are only ten symbols in the denary number system (0-9) and a further six symbols (A-F) are used to represent the remaining six digits . It uses less memory to store more numbers- 256 numbers in two digits whereas decimal number 100 numbers in two digits;

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

Why is hexadecimal used as a shorthand for binary?

A

The main reason for this is that long sequences of binary digits are hard to read and understand for humans. For example, to represent 256 in binary it is 100000000 but in hexadecimal it is 100.

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

Converting binary to denary

A

Just add up place values

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

Converting denary to binary

A

Keep dividing by 2.

145/2 = 72 R 1
72/2 = 36 R 0
36/2 = 18 R 0
18/2 = 9 R 0
9/2 = 4 R 1
4/2 = 2 R 0
2/2 = 1 R 0
1/2 = 0 R 1
= 10010001 (2)

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

Converting binary to hexadecimal

A

Split it:

00101111

1) 0010(2) = 2(10) = 2(16)
2) 1111(2) = 15(10) = F(16)

= 2F(16)

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

Converting hexadecimal to binary

A

Find the equivalent denary number for each of the hex digit then convert those into binary.
FA
F = 15 = 1111
A = 10 = 1010
= 11111010(2)

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

Converting denary to hexadecimal

A
  • Divide denary number by 16 and write down the result and the remainder
  • Repeat the division until you get a result of 0
  • Convert the denary remainders to their hex equivalent
  • Write the remainders in reverse

For 125:
125/16 = 7 R13
7/16 = 0 R 7
13 = D, 7 = 7

7D(16)

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

Converting hexadecimal to denary

A
  • Separate the hex digits and find their equivalent denary values
  • Use the hexadecimal place vales table to multiply each value
  • Add the results of the multiplications together

F8(16)
- F = 15, 8 = 8
1516 = 240
8
1 = 8
F8 = 240+8 = 248(10)

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

What is a bit?

A

A bit is the most basic unit of the data representation used in computer systems and conveys the state of 1 or 0.

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

What is a byte?

A

A byte is 8 bits and it represents the small unit of addressable memory

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

What is a nibble?

A

A nibble is 4 bits.

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

What are words?

A

Words are groups of bytes in a sequence.

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

What is a Kilobyte?

A

10^3 bytes

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

What is a Megabyte?

A

10^6 bytes

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

What is a Gigabyte?

A

10^9 bytes

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

What is a Terabyte?

A

10^12 bytes

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

What is a Kibibyte?

A

2^10 bytes

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

What is a Mebibyte?

A

2^20 bytes

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

What is a Gibibyte?

A

2^30 bytes

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

What is a Tebibyte?

A

2^40 bytes

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

What is the 2^n formula for?

A
  • Each bit in a binary number can be either 0 or 1.
  • If you have one bit, you can represent 2 different values: 0 or 1.
  • If you have two bits, each bit can independently be 0 or 1, giving you 2 * 2 = 4 different combinations: 00, 01, 10, 11.
  • If you have three bits, each bit can independently be 0 or 1, giving you 2 * 2 * 2 = 8 different combinations: 000, 001, 010, 011, 100, 101, 110, 111.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is the difference between kB and KiB?

A

1 kB = 1,000 bytes whereas 1 KiB = 1024 bytes; it provides more precision

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

What is the difference between unsigned binary and signed binary?

A

Unsigned integers have positive values but signed integers can be positive or negative. However representing negative integers using sign magnitude isn’t perfect because it allows for two values of zero: a positive zero and a negative zero. Also, by assigning a sign bit you decrease the range of magnitude. An unsigned byte can represent the numbers 0 to 255, whereas a signed byte can only represent -127 to 127.

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

Classifications of signed representations

A

Ones complement, twos complement

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

What is ones complement?

A

In ones’ complement representation, to represent a negative number, you invert (flip) all the bits of the corresponding positive binary number. The leftmost bit is still used to represent the sign. Range is for highest (2(^n-1) -1) and lowest is -(2(^n-1) -1).

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

What is twos complement?

A

Take the two’s complement of the positive equivalent by flipping all the bits and then adding 1. The range is -2^(n-1) to 2^(n-1) - 1.

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

In unsigned binary what are the minimum and maximum values?

A

0 to 255

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

Adding two unsigned binary integers

A

0+0 = 0
0+1 = 1
1+ 0 = 1
1+1 = 0 carry 1
1+1+1 = 1 carry 1

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

Subtracting two unsigned binary integers

A

0-0 = 0
1-0 = 1
1-1 = 0
0-1 = 1

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

Representing signed integers using one’s complement

A

Write in positive version then flip the values.

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

Representing signed integers using two’s complement

A
  • For positive numbers the MSB needs to be 0
  • For negative numbers the MSB needs to be 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Subtraction with two’s complement

A

Convert to two’s complement and do subtraction

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

Represent numbers with a fractional part in fixed point form in a given number of bits

A

integer part - 2^0, 2^1 …
fractional part - 2^-1, 2^-2 …

If more bits in a memory word are assigned to the fractional part, greater precision is possible; one the other hand, fewer bits are then available for the integer part and this reduces the magnitude range. Conversely, increasing the proportion of a word given to the integer part increases the magnitude range, but reduces the possible level of precision.

42
Q

What is explicit normalization?

A

Move the radix point to the LHS of the most significant ‘1’ in the bit sequence. (-1)^s * 0.M * 2^E-Bias

43
Q

What is the need for normalisation?

A

The normalised version of a fractional number provides a unique representation for a number and allows the maximum possible precision with a given number of bits.

44
Q

What is implicit normalization?

A

Move the radix point to the RHS of the most significant ‘1’ in the bit sequence. (-1)^s * 1.M * 2^E-Bias

45
Q

Using floating point convert from decimal to binary

A
  • Convert to pure fixed point binary - twos complement if it is negative
  • use implicit or explicit normalisation
  • count the number of places in the exponent and do 2^n-1 and add it to the index and represent that in the exponent
  • put the remaining in the mantissa
46
Q

Using floating point convert from binary to decimal

A

Just add it up

47
Q

Using fixed point convert from binary to decimal

A

Just add it up.

48
Q

Explain why both fixed point and floating point representation of decimal numbers may be inaccurate

A

There are some decimal numbers that cannot possibly be represented exactly in binary, even with the use of fixed point or floating point notation. A bit like ⅓, which can only be represented in decimal as 0.3333​…, there are some numbers which binary can only approximately represent.
There are many numbers that binary cannot accurately represent, one of which is 0.1​10 which is 0.00011001100110011​… in binary. For this reason, both fixed point and floating point representations of decimal numbers may be inaccurate.

49
Q

What is a absolute error?

A

An absolute error is the actual amount by which a value is inaccurate and can be
calculated by finding the difference between the given value and the actual value.

50
Q

What is a relative error?

A

A relative error is a measure of uncertainty in a given value compared to the actual value which is relative to the size of the given value. A relative error can be calculated using the formula:
relative error = absolute error/actual value

51
Q

Compare absolute and relative errors for large and small magnitude numbers, and numbers close to one.

A
52
Q

Advantages of fixed point representation

A

Predictable Precision: In fixed-point representation, precision is consistent and predictable, as the number of fractional bits is fixed. This can be advantageous in scenarios where exact precision is crucial.

Deterministic Behavior: Fixed-point arithmetic operations are deterministic, meaning the results are consistent and reproducible. This can be beneficial in applications where precise control over numerical computations is required.

Simplicity: Fixed-point arithmetic can be simpler to implement and understand compared to floating-point arithmetic. It doesn’t require complex hardware or software support for floating-point operations.

53
Q

Disadvantages of fixed point representation

A

Limited Range: Fixed-point representations have a limited range compared to floating-point representations. The number of integer and fractional bits determines the range of representable values, which can be restrictive in some applications.

Scaling Issues: Scaling fixed-point numbers to accommodate a wide range of magnitudes can be challenging. Balancing precision and range requires careful consideration of the allocation of integer and fractional bits.

Difficulty Handling Extreme Values: Fixed-point representations may struggle with extreme values, either very large or very small, as they require extensive scaling to represent accurately.

54
Q

Advantages of floating point representation

A

Extended Range: Floating-point representations offer a much wider range of representable values compared to fixed-point representations. They can accurately represent both very large and very small numbers by adjusting the exponent dynamically.

Adaptive Precision: Floating-point representations allow for adaptive precision, meaning they allocate more bits to represent significant digits for large numbers and fewer bits for small numbers. This flexibility can be advantageous in various scientific and engineering applications.

Standardization: Floating-point arithmetic follows standardized formats (e.g., IEEE 754), making it interoperable across different platforms and programming languages. This standardization ensures consistency in numerical computations.

55
Q

Disadvantages of floating point representation

A

Limited Precision: Floating-point representations have limited precision due to the finite number of bits allocated for mantissa and exponent. This limitation can lead to rounding errors and loss of precision, particularly in numerical computations involving many operations.

Complexity: Implementing floating-point arithmetic can be more complex than fixed-point arithmetic due to the need for specialized hardware or software support. Handling rounding, overflow, and underflow requires additional considerations.

Non-Deterministic Behaviour: Floating-point arithmetic operations can exhibit non-deterministic behaviour due to rounding errors and the finite precision of representation. This can lead to variability in results, especially in iterative computations.

56
Q

Explain overflow

A

Overflow is when the result of a numeric calculation becomes too large to be stored in the space reserved for numbers. Some machines have a variable called an overflow flag, which is set to 1, after a calculation is overflow has occurred. An example of overflow occurring is when trying to compute the factorial of 100 on calclator.

57
Q

Explain underflow

A

Underflow occurs when you are using very small numbers and you reach the boundary of what the computer can store. For example, if the smallest number a computer could store was 1/128 and the user attempted a sum like 1/128 * 1/128

58
Q

Differentiate between the character code representation of a decimal digit and its pure binary representation.

A
59
Q

Describe ASCII and Unicode coding systems for coding character data and explain why Unicode was introduced.

A
  • ASCII stands for American Standard Code for Information Interchange.
  • It uses 7/8 bits to represents characters- 7/8 bits per character
  • When text is encoded and stored using ASCII, each of the characters is assigned a denary character code, which is represented and stored in the computer as binary
  • A problem with ASCII is it only represents a small number of characters; might be enough to represent the characters in the English alphabet but not sufficient to represent all of the languages in the world therefore Unicode is used- it uses 16 bits giving a range of over 65,000 characters
  • ASCII takes of less storage space as it only uses 7 or 8 bits per character
  • Unicode represents more characters from various languages
60
Q

What are the error checking methods?

A

parity bit, majority voting, checksum, check digit

61
Q

What is parity bit?

A
  • A parity bit is a method of detecting errors in data during transmission
  • When data is sent in binary code, it could be prone to getting corrupted as it is passed around either inside the computer or across a network
  • As the binary code is being sent on carrier waves any slight variation in the frequency could mean that a 0 is misinterpreted as a 1; this would make the data unreliable
  • Even parity: the number of 1s in the code is first counted. If there are an odd number of 1s, the parity bit is set to one to make the total number of 1s even. When the data is received, it is checked to ensure that there are still an even number of 1s. If there are, then the data is assumed to be correct.
  • Odd parity: the number of 1s is first counted. If there are an even number of 1s, the parity bit is set to one to make the total number of 1s odd. When the data is received, it is checked to ensure that there are still an odd number of 1s. If there are, the data is assumed to be correct.
62
Q

What is majority voting?

A
  • Majority Voting is a method of identifying errors in transmitted data
  • Each bit is sent three times
  • When the data is checked, the expectation would be that there are patterns of three bits
  • Where there is a discrepancy, you can use majority voting to see which bit occurs the most frequently
63
Q

What is checksum?

A

Checksum is a mathematical algorithm applied to a block of data. The data from the block is used in order to create the initial checksum which is then added and transmitted along with the original data. The same algorithm is applied at the other end, if the checksums match we consider the data to have been transmitted correctly.

64
Q

What is check digit?

A
  • Check digits is a form of redundancy check used for error detection on identification numbers, such as bank account numbers, which are used in an application where they will at least sometimes be input manually.
  • The digits are added up until there is a single digit remaining
  • For example, 123456 would be 21 and 2 + 1 is 3, so the number with its check digit becomes 1234563
  • However, this method does not take into account the order of the numbers
  • In order to overcome this each digit is given a weighting
  • To check that a code number is valid, it is not necessary to recalculate the check digit completely
  • If the check digit itself is assigned a weight of 1, and the products of the digits (including the check digit) and their respective weights are calculated, their sum will be divisible by 11 if the check digit is correct.
  • For example, 23045 would be allocated 65432 (always starts from 2 not 1)
  • The weightings would be multiples with the digits so 12, 15, 0, 12, 10
  • These added up makes 49
  • Then the number is always divided by 11- 49/11- 4 R 5
    11 - 5= 6

The check digit is 6
230456

65
Q

Describe how bit patterns may represent other forms of data, including graphics and sound.

A

In binary, data can only be in one of two states - on or off. This is useful for computer systems as it removes the ambiguity that computers cannot handle and makes their responses to input predictable and consistent. This means that bit patters can be used to do a plethora of tasks including representing images, transforming waveforms into audio and calculating the size of files.

66
Q

Difference between analogue and digital data and signals

A
67
Q

Explain how an ADC works?

A
68
Q

Explain how a DAC works

A
69
Q

How are ADCs are used with analogue sensors.

A
70
Q

Uses of DAC

A
71
Q

How are bitmaps represented?

A
72
Q

Factors of bitmaps

A
73
Q

What is resolution?

A
74
Q

What is colour depth?

A
75
Q

What is the size in pixels?

A
76
Q

How to calculate storage requirements for bitmapped images?

A
77
Q

What is metadata and give examples?

A
78
Q

Explain how vector graphics represents images using lists of objects.

A
79
Q

Give examples of typical properties of objects.

A
80
Q

How to use vector graphic primitives to create a simple vector graphic?

A
81
Q

Compare the vector graphics approach with the bitmapped graphics approach and understand the advantages and disadvantages of each.

A
82
Q

Give uses for vector graphics

A
83
Q

Give uses for bitmapped graphics

A
84
Q

What are the factors to consider in digital representation?

A
85
Q

What is sample resolution?

A
86
Q

What is sampling rate?

A
87
Q

How to calculate sound sample sizes in bytes?

A
88
Q

Describe the purpose of MIDI and the use of event messages in MIDI.

A
89
Q

Describe the advantages of using MIDI files for representing music.

A
90
Q

Know why images and sound files are often compressed and that other files, such as text files, can also be compressed.

A
91
Q

What is lossless compression?

A
92
Q

What is lossy compression?

A
93
Q

Pros and cons of lossless

A
94
Q

Pros and cons of lossy

A
95
Q

What is run length coding and how does it work?

A
96
Q

Explain how dictionary-based methods work

A
97
Q

Understand what is meant by encryption and be able to define it.

A
98
Q

How does Caesar cipher work?

A
99
Q

How does Vernam cipher work?

A
100
Q

Explain why Vernam cipher is considered as a cypher with perfect security.

A
101
Q

Compare Vernam cipher with ciphers that depend on computational security.

A