Computer Systems (II) - Data Representation Flashcards

1
Q

How do computers represent the flow of electricity?

A

1s and 0s

1 – electricity flowing

0 – electricity not flowing

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

What is a 0 or 1 in a binary code?

A

Each 0 or 1 in a binary code is a bit (binary digit)

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

How many bits is the binary code 1010?

A

4 bits

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

What is a byte big enough to store?

A

A byte can store one character (e.g. A, 1, £ etc…)

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

What two values can a bit take?

A

A 1 or a 0

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

Draw a table to represent the size of units of data

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

How many bits is a nibble?

A

4 bits

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

How many different values can a nibble take?

A

2 to the power 4 = 16x different values

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

How many different values can a byte take?

A

2 to the power 8 = 256x different values

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

How many bits are in a byte?

A

8 bits are in a byte

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

How many kB are in a B, MB in a kB, GB in a MB, TB in a GB and PB in a TB?

A

1000

*Units are sometimes defined as 1024 not 1000 as 1024 is a power of 2 which is helpful when dealing with binary

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

What base in binary?

A

Base 2 (binary)

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

What is our standard number system?

A

Denary (or decimal / base 10)

E.g. 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
14
Q

In denary, what increase exists for the place value from right to left?

A

Powers of 10 (1000, 100, 10, 1)

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

In binary, what increase exists for the place value from right to left?

A

Powers of 2 (8, 4, 2, 1)

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

What are the binary equivalents of the denary 0-15?

A

0 = 0

1 = 1

2 = 10

3 = 11

4 = 100

5 = 101

6 = 110

7 = 111

8 = 1000

9 = 1001

10 = 1010

11 = 1011

12 = 1100

13 = 1101

14 = 1110

15 = 1111

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

What are most binary numbers given as?

A

8-bit numbers, e.g. 00110101

This can represent the denary numbers 0-256

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

The bit with the largest value of on what side?

A

The left-most bit

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

What is the left-most bit referred to as?

A

The most significant bit

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

What is the right-most bit referred to as?

A

The least significant bit

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

What does any non-zero number raised to the power 0 equal?

A

1

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

Draw out a table with binary place values to make a binary / denary conversion for the binary 00110101 and calculate the denary for this

A

00110101 = 53 in denary (add numbers with 1 in the column)

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

How can denary be converted to binary?

A

By subtracting (from largest to smallest)

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

Draw out a table to convert 79 into an 8-bit binary

A

79 = 01001111 in binary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How are binary numbers added together?
Column additions
26
What are the steps required for a binary addition?
Place the binary numbers into columns Starting from the right, add numbers in the columns When 1 + 1 = 10, carry the 1 into the next column
27
Add the binary numbers 10001101 and 01001000 together
28
In a binary addition if you come across 1 + 1+ 1 what should be done?
Write the 1, then carry 1 to the next column
29
Add the binary numbers 00110011 and 01111001 together
30
What causes an overflow error?
When a number has too many bits E.g. 8-bit calculation 11111111 + 00000001 gives the 9-bit answer 100000000 The computer will see the 1 as an overflow error and return the result 00000000 – an overflow flag will be shown (storing the extra bits elsewhere)
31
What is a binary shift?
A binary / logical shift moves every bit in a binary number left or right (gaps are filled with a 0) The direction of the shift indicates a multiplication or division
32
What is the difference between a left binary shift and a right binary shift?
A shift left multiplies and a shift right divides
33
Perform a 3-place binary shift to the left for the 8-bit binary number 00101001
34
Perform a 2-place shift to the right for the 8-bit binary number 00101001
35
What are hexadecimals?
Hexadecimals use base-16 and use a combination of digits and characters to represent the denary numbers 0-15 A hex character equals a nibble (going from 0-9 and then A-F)
36
List the hex characters
37
How is hex converted to denary?
Each character is multiplied Moving right to left increases place values in powers of 16
38
Convert the hexadecimal number 87 into denary
7 x 1 = 7 8 x 16 = 128 Hex 87 = 135 in denary
39
How is denary converted into hex?
Each character is divided Start at the left and divide, holding onto the remainders
40
Convert the denary 106 into hexadecimal
106 / 16 = 6 (remainder 10) | 10 / 1 = 10 (A)
41
How do you convert binary to hex?
Split into nibbles – each hex character equals a nibble
42
Convert the binary 10111001 to hexadecimal
8 + 2 + 1 = 11 (B) | 8 + 1 = 9
43
If a binary number cannot be split into nibbles, e.g. 111110 what must be done for a conversion into hexadecimal?
Zeros need to be added to the left to create nibble so the binary becomes 00111110 Hex = 3E
44
How is hex to binary calculated? Give the example hex 8C to binary
Each character’s denary value is needed so 8 becomes 1000 and C becomes 1100 8C = binary 10001100
45
How do computers process alphanumeric characters?
Characters are converted to binary code (and vice versa) Character sets are used
46
Name two character sets
ASCII and Unicode
47
What do character sets include alongside letters, digits and symbols?
Special characters which perform commands E.g. enter / delete
48
Give two examples of special characters in a character set
Enter Delete
49
What are the features of ASCII?
Each character is given a 7-bit binary code (128x characters can be represented) Includes all letters in English alphabet + numbers + symbols + commands Extra bit added (0) at start to make 1 byte
50
What does this table show?
ASCII table
51
What are the features of Unicode?
Unicode tries to cover every possible letter or symbol in all languages It uses multiple bytes for each character The first 128 codes in Unicode are the same as ASCII
52
What is the formula for working out the size of a text file?
File size (bits) = number of bits per character x number of characters
53
What is the size of a text file using 8-bits per character (ASCII) containing 200x characters?
8 x 200 = 1600 bits
54
How are images stored?
Images are stored as pixels The colour is represented by binary Greater range of colours / shades by increasing the number of bits
55
What bit rate would the following image be represented by?
1-bit (black and white) 0 for white and 1 for black
56
What bit rate would the following image be represented by?
2-bit (four colours) 00 for white, 01 for light grey, 10 for dark grey and 11 for black
57
What do most modern devices use for their colour-depth?
24-bit colour which gives 16’777’216 colours *Human eye estimated to see 10’000’000 colours
58
Given the colour depth, what is the formula for working out how many colours can be made? Give exams for 1-bit, 4-bit and 24-bit
Total number of colours = 2 to the n n = number of bits per pixel (bpp)) ``` 1-bit = 2 to the 1 = 2 colours 4-bit = 2 to the 4 = 16 colours 24-bit = 2 to the 24 = 16’777’216 colours ```
59
What happens as colour depth / resolution increases?
File size increases
60
What is image resolution?
The number of pixels in the image Sometimes given as width x height Higher resolution = better quality (but more data)
61
How can the file size of an image be calculated?
File size (bits) = image resolution x colour depth OR File size (bits) = width x height x colour depth
62
What is the file size in MB of an 8-bit image that is 2000 pixels wide x 1000 pixels high?
8 x 2000 x 1000 = 16’000’000 bits 16’000’000 / 8 = 2’000’000 bytes 2’000’000 / 1000 = 2000 kB 2000 / 1000 = 2 MB
63
What is metadata?
Metadata is information stored in an image file which helps the computer recreate it Without metadata the device would not be able to display the image
64
What does metadata include?
File format Height Width Colour depth Resolution Time / date When created / edited Location
65
How are sounds recorded onto a computer?
Sound is recorded by a microphone as an analogue signal These are sampled and converted into a digital signal
66
What does the following show?
A sampled analogue signal
67
How does sampling work?
The amplitude of the wave is sampled at regular intervals – each block matches the sample taken The digital sample, unlike the analogue, isn’t continuous – a lot of data has been lost The more regular the samples are taken, the less information that is lost – most music is sampled every few milliseconds
68
What is sample rate?
Sample rate (frequency) is how many samples are taken per second, measured in Hz A common sample rate is 44’100 Hz (44.1 kHz)
69
How can the size of a sound file be calculated?
File size (bits) = sample rate (Hz) x bit depth x length (seconds)
70
How can the quality of a sound file be changed?
Increasing the sample rate means the analogue recording is sampled more often, matching the original sound more closely (better quality) Increasing the bit-depth means the digital sample picks up quieter sounds even if they’re happening at the same time as louder sounds – again, making the original analogue sound more closely
71
What happens when the sample rate or bit-depth increases?
The file size increases
72
Why is compression useful?
Smaller files take up less storage space Streaming / downloading is quicker and requires less bandwidth Services with restrictions (e.g. email) allows content to be sent which might otherwise have been blocked
73
What are the two types of compression and what are their key attributes?
Lossless – the file is made smaller, temporarily removing data to store the file, then restoring it to its original state. No data is lost Lossy – the file has data permanently removed, limiting the number of bits the file needs
74
What type of compressions are shown in the following image?
The image at the top is lossless compression – when reverted, it retains all the data The image at the bottom is lossy – it has lost some quality *Lossy allows for greater reduction in size, but at a cost to the quality
75
What are the benefits of Lossy compression?
Greatly reduced file size Take up less bandwidth (download / streaming quicker) Commonly used
76
What are the negatives of Lossy compression?
Loses data – can’t be turned back to original state Can’t be used on text or software as data cannot be lost for these Worse quality (though can be unnoticeable)
77
What are the benefits of Lossless compression?
Data only removed temporarily – no reduction in quality Can be decompressed to return to the original state Can be used on text and software files
78
What are the negatives of Lossless compression?
Only a slight reduction in file size is possible E.g. a lossless song may be compressed to 30MB whilst a lossy compression could get to around 5MB
79
Give some examples of Lossy compression
MP3 (audio) AAC (audio) JPEG (image)
80
Give some examples of Lossless compression
FLAC (audio) TIFF (image) PNG (image)