Data Representation Flashcards

(68 cards)

1
Q

What is the smallest possible unit in a computer?

A

A bit

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

What is a byte?

A

8 bits grouped together

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

How does binary conversions work?

A

Each digit to the left doubles/increases by a power of 2 ; if the number is a 0 then u ignore and if its a 1 u add that value

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

What are the 4 rules of binary addition?

A
  1. 0+0=1
  2. 1+0=1
  3. 1+1=0, with a carry of 1
  4. 1+1+1=1, with a carry of 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the MSB?

A

The most significant bit: largest value column (furthest left)

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

What is the LSB?

A

The least significant bit: the smallest value column (furthest right)

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

What is the MSB used for?

A

To represent whether the number is positive or negative ; if a binary begins with 1, then its negative, if 0 then positive (look on flashcard 7)

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

What are fixed point binary numbers?

A

A specified number of bits before and after the binary point

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

How do the numbers work after the binary point?

A

Negative power of 2/halves in size

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

What are the differences between fixed-point and floating-point binary numbers?

A

-It’s faster to process calculations using fixed-point numbers compared to floating-point numbers (this means that floating-point numbers are best suited to situations where you need to represent a wide range of values)

-Fixed-point is best suited when speed of processing is more important than precision

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

What is an underflow error?

A

Occurs when result is too small for the register to hold [opposite of overflow]

[Dividing a very small number by a large one will make a number so small that it could be stored as 0]

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

Why do computers round some number?

A

Because some numbers cannot be represented using the number of bits allocated to them eg 2.7, in this case the number is rounded to the nearest representable number

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

What are the 2 different methods of measuring the precision of a rounded value?

A

Absolute error and relative error

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

What is absolute error?

A

The difference between the rounded number and the actual number {basically how far off you are from the actual number eg 5.2 [rounded], 5(actual); absolute error= 0.2}

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

What is relative error?

A

The proportion/percentage of how far off you are from the actual number

To calculate, you take the absolute error and then divide by actual number, then multiply by 100

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

How many unsigned binary integers can be represented using n bits?

A

2^n will give you no. of integers

2^n-1 will give you highest number that can be stored

eg 7 bits? 2^7 integers can be represented

2^7-1 = 127 highest number than can be stored

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

What are the 4 main techniques for detecting errors?

A
  1. Parity bits
  2. Majority vote
  3. Checksum
  4. Checkdigit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a parity bit?

A

A parity bit is a single bit added to a string of binary code which indicates whether the number of 1s in the string is even or odd

Even Parity: The parity bit is set so that the total number of 1s in the string, including the parity bit, is even.

Odd Parity: The parity bit is set so that the total number of 1s in the string, including the parity bit, is odd

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

What is majority vote?

A

When each bit sent 3 times; the bit that occurs the most is kept as the valid value in the bit pattern

[inefficient as it sends triple the data needed]

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

What is checksum?

A

A hash of data within a packet; the checksum is sent along with the packet

When the packet is received the checksum is recalculated and if they match then the data has been received correctly. If they don’t then an error has occurred

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

What is a checkdigit?

A

Added to the end of the number that is calculated by using the rest of the digits

[used coz its common for human error to occur during entry of long code eg customer numbers/receipts, usually MOD11 method]

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

NOTE

A

Parity bits, checksums and checkdigits detect errors but cant correct them

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

What are natural numbers and what is its notation?

A

A positive whole number used for counting eg 0,1,2,3, ‘100 students at an event’

Notation: N

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

What is the notation of integers?

A

Notation: Z

however, by definition it also includes all of N

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the notation for rational numbers?
Notation: Q eg 1/2, 9/12, 4:3 However, by defiition it also include all of Z as any integer can be expressed as a fraction eg 3/1
26
What is the notation for irrational numbers?
None eg pi, root 2, root 76, golden ratio, euler's number
27
What are real numbers and what is its notation?
Any possible real-world quantity expressed as a number eg -11,6.5, pi Notation: R Used for measurements R includes all of Q,Z,N but not imaginary numbers such as infinity
28
What are ordinal numbers and what is its notation?
Used to describe the numerical position of objects eg 'he came 2nd in the race' Notation: None
29
What bytes are stored in base 10?
Kb= 10^3 Mb= 10^6 Gb= 10^9 Tb= 10^12
30
What bytes are stored in base 2?
Ki= 2^10= Kibibytes Mi= 2^20= Mibibytes Gi= 2^30= Gigibytes Ti= 2^40= Tebibytes
31
What are bitmapped graphics?
An image that's divided into pixels
32
How do bitmapped graphics work?
The colour in each grid is sampled and then assigned a binary code to represent the average colour in that cell which is then stored in a particular position in memory
33
What is colour depth?
Number of bits used to represent the colour of a single pixel in a bitmapped image [RGB is used]
34
What is true colour?
When 24 bits are allocated -Can mimic cany colour found in the real world producing 16.7 million distinct colours
35
What are the disadvantages of bitmapped graphics?
Quality gets worse as image is enlarged [pixelation] Large file sizes [in raw form]
36
What are vector graphics?
Records the geometric and other info about the objects that make up an image
37
What are the advantages of vector graphics? [4]
Good for simple things like logos (eg a tree would be complicated) When enlarged theres no distortion Geometric images require fewer bytes in vector graphic format They load and download faster
38
What is a drawing list?
The list of drawing commands that recreate a vector graphic
39
What is Run-length encoding [RLE] ?
A lossless compression technique which takes into account that some images have long runs of pixels that are the same colour (3 or more bytes)
40
How does Run-length encoding [RLE] work?
It looks for pixels which have the same colours and then encodes the information to less bytes
41
What is lossy compression?
Compression discards information which is not considered important eg background scenery is saved with less resolution [therefore, decompressing results in an uncompressed image that is different from the original]
42
What is analogue data?
Continuously varying data eg temperature
43
What is digital data?
discreet value; exact; precise
44
What is a digital signal?
An electrical signal with voltage changes that are abrupt/discrete/discontinuous
45
How does an analogue system work?
The sound pressure wave is captured by a transducer [eg microphone] that produces an electrical voltage/current that varies in proportion to pressure [basically it converts sound energy to electricity]
46
How does a computer record sound?
An ADC* samples and converts an analogue signal into an equivalent digital signal using 2 voltage levels ; to play back the recorded sound a DAC* is used ADC*= analogue to digital converter DAC*= Digital to analogue converter
47
What is PCM (Pulse Code Modulation)?
Records height of each sample in a binary electrical equivalent [analogue to digital conversion relies heavily on a technique called pulse code modulation]
48
What is PAM (Pulse Amplitude Modulation)?
A way to send information by changing the height [amplitude] of pulses in a signal
49
What is sampling resolution?
No. bits assigned to each sample
50
What is Nyquist's theorem?
Nyquist's theorem states that we must sample at a frequency of at least double the highest frequency i the signal eg if the highest frequency of a sound is 20kHz, then you would need a sampling rate of atleast 40kHz
51
What is Wav format?
uncompressed audio file format developed by Microsoft; most commonly use when audio is stored on CD;
52
What is MPEG?
It's primarily a compression algorithm that can be applied to a number of audio formats, eg WAV. MPEG removes frequencies the brain and ear will NOT miss; substantially reduces fie size.
53
How does streaming work? *
Sound comes in as they're needed but without occupying file space on your hard drive [Prevents copying and avoids the need to download and store large sound files]
54
What is MIDI and how does it work? sound synthesis
A way of representing the sound made by an instrument. It doesn't store sound waves but it stores a digital representation of the notes to be played including what note, what instrument and what duration
55
How does a synthesiser work?
A synthesiser uses digital means to generate audio signals that resemble instrument sounds or the human voice
56
What is symmetric encryption?
When both the receiver and seder has the same key
57
What is asymmetric encryption?
Sender and receiver has different keys aka public key encryption
58
What is the difference between public key encryption and private key encryption?
The encryption algorithm and public keys are freely available whereas private keys are kept secret
59
What is the definition of Cipher?
Method of encryption
60
What is the definition of Plaintext?
Message before encryption
61
What is the definition of Ciphertext?
Message after it has been encrypted
62
What is the definition of encryption?
The process of changing a message to make it unreadable without a special key
63
What is polyalphabetical cipher?
Repeating the process by using more than 1 alphabet [all alphabets are needed to decrypt] [underlying principle of enigma machine]
64
Frequency analysis
Frequency analysis involves studying the frequency of letters or groups of letters in a ciphertext. [ By analszing how often certain letters appear, you can make educated guesses about the plaintext.]
65
What is a vernam cipher?
Uses a one-time pad [OTP] to encrypt the message
66
How does vernam cipher work?
Each page of a one-time pad features a series of random digits ; the plain text is encrypted by mixing each digit from the OTP [its truly random] [symmetric encryption; destroyed after use]
67
What is exclusive or / xor? *
When you make one of the statements true
68
How can we decrypt?
By reversing the process of encryption