Data Representation Flashcards

1
Q

How many inputs and outputs do NOT gates have?

A

1) one input

2) one output

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

Put these units in order of size (smallest to largest):

Terabyte, Byte, Kilobyte, Gigabyte, Megabyte

A

Byte, Kilobyte, Megabyte, Gigabyte, Terabyte

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

Convert 17 (decimal) to binary.

A

10001

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

Convert 17 (decimal) to hexadecimal.

A

11

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

Convert 0011 1000 (binary) to decimal.

A

56

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

What effect do left and right shifts have on binary numbers?

A

1) left shifts multiply a binary number. For every place shifted left, the number is doubled
2) right shifts divide a binary number. For every place shifted right, the number is halved

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

Convert 1001 1111 (binary) to decimal.

A

159

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

Convert 1001 1111 (binary) to hexadecimal.

A

9F

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

Convert 10 1011 (binary) to decimal.

A

43

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

Convert 10 1011 (binary) to hexadecimal.

A

2B

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

Convert 4A (hexadecimal) to decimal.

A

74

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

Convert 4A (hexadecimal) to binary.

A

1001010

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

Convert 75 (hexadecimal) to decimal.

A

117

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

Convert 75 (hexadecimal) to binary

A

1110101

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

Convert 148 (decimal) to binary.

A

10010100

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

Convert 148 (decimal) to hexadecimal.

A

94

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

Convert 240 (decimal) to binary.

A

11110000

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

Convert 240 (decimal) to hexadecimal.

A

F0

19
Q

Convert BD9 (hexadecimal) to decimal.

A

3033

20
Q

Convert BD9 (hexadecimal) to binary.

A

101111011001

21
Q

Encode this string using run-length encoding:

PPPPQQRRRSSSSSSPPPPPQQQ

A

(4,P), (2,Q), (3.R), (6,S), (5, P), (3, Q)

22
Q

Calculate the number of bits needed to store this string if it was encoded with ASCII:
PPPPQQRRRSSSSSSPPPPPQQQ

A

23 X 8 = 184 bits

23
Q

Calculate the number of bits needed to store this string if it was encoded with huffman coding:
PPPPQQRRRSSSSSSPPPPPQQQ

A

9 + 15 +9 +12 = 45 bits

24
Q

Calculate the number of bits needed to store this string if it was encoded with run-length encoding (if each data pair used 2 bytes):
PPPPQQRRRSSSSSSPPPPPQQQ

A

8 x 2 x 6 = 96 bits

25
Q

Why do programmers prefer hexadecimal over binary and decimal?

A

1) it’s simpler to remember large numbers in hex - they’re far shorter than binary numbers
2) due to hex numbers being shorter, there’s less chance of input errors
3) it’s easier to convert between binary and hex than binary and decimal

26
Q

What is the definition of a character set?

A

A collection of characters that a computer recognises from their binary representation

27
Q

What are the four types of characters that are included in a character set?

A

1) uppercase letters
2) lowercase letters
3) digits
4) symbols

28
Q

What are the two main character sets?

A

1) ASCII

2) Unicode

29
Q

Define the term ‘pixel’.

A

One of the individual units that that make up an image

30
Q

Define the term ‘bitmap’.

A

An image made up of pixels

31
Q

Define the term ‘colour depth’.

A

The number of bits used for each pixel

32
Q

Define the term ‘image resolution’.

A

The number of pixels in the image

33
Q

What are the effects of choosing a greater image resolution or colour depth for an image?

A

Using a greater image resolution or colour depth means that there are more bits in the image. This can give a higher-quality image, but also increases the file size

34
Q

How does audio sampling work?

A

1) sound is recorded by a microphone as an analogue signal
2) the analogue signals are converted into digital data by analogue to digital converters so that computers can read and store sound files

35
Q

Define the term ‘sample rate’.

A

How many samples you take in a second

36
Q

What happens when you increase the sample rate?

A

Increasing the sample rate means the analogue recording is sampled more often. The sampled sound will be better quality and will more closely match the original recording. However, increasing the sample rate will increase the file size

37
Q

Define the term ‘sample resolution’.

A

The number of bits available for each sample

38
Q

What happens when you increase the sample resolution?

A

Increasing the sample resolution means the digital file picks up quieter sounds, even if they’re happening at the same time as louder ones. This will also result in a sampled sound that is closer to the quality of the original recording. However, increasing the sample resolution will increase the file size

39
Q

Why might you want to compress data?

A

1) smaller files take up less storage space on a device
2) streaming and downloading files from the internet is quicker as they take up less bandwidth
3) it allows web pages to load more quickly in web browsers
4) email services normally have restrictions on the size of the attachment you can send - compressing the file allows you to send the same content with a much smaller file size

40
Q

What is the difference between lossy compression and lossless compression?

A

1) lossy compressionn works by permanently removing data from the file - this limits the number of bits the file needs and so reduces its size
2) lossless compression makes the file smaller by temporarily removing data to store the file and then restores it to its original state when it’s opened

41
Q

Why might you want to use lossy compression?

A

1) greatly reduced file size, meaning more files can be stored
2) takes up less bandwidth so can be downloaded and streamed more quickly
3) commonly used - lots of software can read lossy files

42
Q

Why might you want to use lossless compression?

A

1) data is only removed temporarily so there is no reduction in quality - the compressed file should look or sound like the original
2) can be decompressed - turned back into the original
3) can be used on text and software files

43
Q

What is the formula used to work out how many bits an image will take up?

A

file size (in bits) = image resolution x colour depth = width x height x colour depth

44
Q

What is the formula used to calculate the size of a sound file?

A

file size (in bits) = sample rate (in Hz) x sample resolution x length (in seconds)