05 Data Representation Flashcards

1
Q

What are natural numbers?

A

Any number from 1-9

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

What are integers?

A

Any positive or negative whole numbers

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

What are rational numbers?

A

Values that can be expressed as fractions

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

What are irrational numbers?

A

Numbers that cannot be expressed as fractions
Decimal values that are endless
(Pi)

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

What is a real number?

A

Any rational or irrational number

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

What are ordinal numbers?

A

Numbers that describe the position that values appear in

1st,2nd

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

What are the binary and denary number systems?

A

Binary is base 2 with digits 0 and 1

Denary is base 10

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

How do you convert from denary to binary?

A

Draw the table from 128 to 1 and add up

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

What is hexadecimal?

A

Base 16 which uses 1-9 then from A=10 B=11 and so on

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

What are the rules of place value for hexadecimal?

A

Last digit must be times by 16^0 and next must be times by16^1 and so on

E.g

F5 = (16^1 x 15) + (16^0 x 5)
= 16x15 + 1x5
=240 + 5
=245

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

How do convert denary to hexadecimal?

A

Divide the number by 16 and add the remainder

Example: 2468

2400 ÷ 16 = 154
remainder 4

154 ÷ 16 = 9 remainder A

9 ÷ 16 = 0 remainder 9

2468 in denary is 9A4 in hex

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

How do you convert from binary to hexadecimal?

A

Split the binary number in halves of 4 bits and convert them to hex

11011000

8421 8421
1101 1000

13 8

D8

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

How do you convert from hexadecimal to binary?

A

Turn each digit into 4 bit binary

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

Why use hexadecimal?

A

Hexadecimal is easier to read than binary
Quicker to write
Less chance of making an error
Used to define colours, in MAC addresses, machine code and assembly language
Easy to convert to and from binary

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

How do you add binary numbers?

A
0+0 = 0
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
16
Q

What is overflow error?

A

When the result of addition is too large for the number of bits the computer can work with

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

How do you multiply binary numbers?

A

Same as decimal multiplication where u multiply everything by last digit then add 0 to end and use second digit

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

How are negative numbers represented in binary?

A

Using two’s complement

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

How do you calculate two’s complement?

A

Flip all of the bits and add 1 to the end

E.g.

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

What is the range of values that can be counted in binary and using two’s complement?

A

Binary = 2^n-1

Two’s complement = -(2(^n-1)) … 2(^n-1) - 1

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

How do you subtract two binary numbers?

A

Turn one into a negative using two’s complement and add them together

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

How do you show binary fractions?

A

Use bits to the right as fractions

Instead of 128 64 32 16 8 4 2 1

It would be 8 4 2 1 1/2 1/4 1/8 1/16

They are negative powers of 2 (2^-1, 2^-2)

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

What is a fixed point binary value?

A

It uses a specified number of bits where the binary point is fixed

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

How many bits is a byte?

A

8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How many bytes are in one kilo, mega, giga and tera byte?
``` Kilo = 10^3 = 1000 Mega = 10^6 = 1,000,000 Giga = 10^9 Tera = 10^12 ```
26
How many bytes are in one kibi, mebi, gibi and tebi byte?
``` Kibi = 2^10 Mebi = 2^20 Gibi = 2^30 Tebi = 2^40 ```
27
What is ASCII?
American Standard Code for Information Interchange Encodes symbols found in the English alphabet Different binary values for uppercase, lowercase and punctuation, space, numbers and special characters.
28
What is Unicode?
Standardises encoding of characters from all languages as ASCII only worked in English Can be 16 or 32 bits
29
What is a transmission error and why might it occur?
When data doesn’t arrive in the same format it was sent Electrical interference Power surges Synchronisation issues Wear and tear on cable or connectors
30
What might a transmission error cause?
It can cause bits to flip
31
What are four ways of error detection?
Parity Bits Majority Voting Check Digits Check Sums
32
What happens when an error is detected?
The data cannot be corrected so a request to resend data is invoked
33
What are parity bits?
One bit in the data is used as a parity bit to show odd or even The number of 1s must be odd for odd parity and even for even parity
34
What is majority voting?
Each bit is sent three times and the majority rule is applied E.g. if there are two 1s and one 0 then the bit will be 1
35
What is a check digit?
An additional digit at the end of a string designed to check for mistakes
36
What is a checksum?
A total sum of all the bytes is calculated using an algorithm and is sent with the data The receiver then calculates the checksum and works out whether the value was right
37
What is digital and analogue data?
Digital is in a format a computer can understand Analogue can be measured to any degree of accuracy
38
How is an image captured?
A light sensor measures intensity of colour in each pixel This is converted into a binary code using an an analogue-to-digital convertor
39
What are the types of bitmap file?
``` BMP JPG GIF PNG TIF ```
40
What is resolution and how is it worked out?
Number of Pixels used to make up a bitmap image Width x height
41
What happens when an image is made bigger or smaller?
The size of each pixel grows or shrinks | When made bigger this decreases quality
42
What is bits depth or colour depth?
Allows more colour combinations | Worked out by 2 to the power of number of bits
43
How are colour values expressed?
In hexadecimal with RGB values as binary would take up too much space
44
How is image file size calculated?
Number of pixels (resolution) x colour depth
45
What is metadata?
``` Data about the image stored in the same file E.g. Date Width and height Colour depth GPS location ```
46
What are ADCs and DACs?
ADCs - Analogue to Digital converters (Microphones) | DACs - Digital to Analogue converters (Speakers)
47
How does analogue to digital and digital to analogue conversion work?
Recorded via amplifier (sampled at set intervals) Each sample is quantised to measure height Integer value is stored as binary Reverse happens for digital to analogue
48
What is sampling and sampling rate?
An analogue signal is measured at regular periods. Amplitude is sample resolution (audio bit depth) Sampling rate - (Hertz) Number of samples taken in one second
49
How does sampling rate affect detail and file size?
Higher sampling rate = more detail = higher file size
50
How do you work out sound file size?
File size = | sample rate x resolution x length in seconds
51
What is the Nyquist theorem?
Samples must be twice the highest frequency in order to replicate original sound wave
52
What frequencies can the human ear hear?
Between 20Hz and 22kHz
53
What is MIDI and what are its benefits and drawbacks?
Musical Instrument Digital Interface Creates synthesised sounds Reduces amount of data transferred May not sound realistic
54
What can a sound processor do?
Send a timed sequence of event messages to Synchronise tempo Control pitch Change volume Introduce and silence other instruments in a digital orchestra
55
What are advantages and disadvantages of data transfer?
Is usually high speed and accurate Longer distance means slower speed Storage space can be limited
56
What does reducing the amount of data do?
Data is sent more quickly Less bandwidth is used as transfer limits may apply Buffering on audio and video streams is less likely to occur Less storage is required
57
How does lossy compression work?
Non essential data is removed | E.g. different shades of the same colour or frequencies outside of human hearing
58
How does lossless compression work?
Patterns in the data and summarised in a shorter format without being removed Run Length encoding : good for images and sounds
59
What is dictionary compression?
Spots regularly occurring data and stores it separately in a dictionary Good for larger data sets
60
What is Run Length Encoding?
Basic method of compression that summarises consecutive patterns Good for images and sounds
61
What is encryption?
A way of making sure data cannot be understood if you don’t possess the means to decrypt it
62
What is a Caesar cipher?
Most basic type of encryption | Letters of alphabet are shifted by a consistent amount
63
What is a brute force attack?
When every possible key is applied in an attempt to decrypt cipher text
64
What is frequency analysis?
Finding letters that are most used like E, T and A to help decrypt the ciphertext
65
What is the vernal cipher?
One time pad Only cipher that is unbreakable (not computer generated) Key must be truly random and shared with only the recipient and destroyed afterwards
66
How can you decode the message?
Performing an XOR operation with the shared key bit by bit
67
Are ciphers completely secure?
Ciphers are based on computational security The keys are determined using a computer algorithm A key derived from an algorithm, can also be unpicked Given enough ciphertext, computer power and time, any key (except the one-time pad) can be determined and the message cracked