Chapter 1 (1.1, 1.2, 1.3) Data representation Flashcards Preview

Computer Science > Chapter 1 (1.1, 1.2, 1.3) Data representation > Flashcards

Flashcards in Chapter 1 (1.1, 1.2, 1.3) Data representation Deck (51)
Loading flashcards...
1
Q

What is Pixel

A

The smallest element used to make up an image on a display.

2
Q

What is an image

A

a series of pixels that are converted to binary, which is processed by a computer

3
Q

What is Colour depth

A

The number of bits used to represent the colours of a pixel.

4
Q

What is Image resolution

A

The total number of pixels that make up an image.

5
Q

File size of an image

A

Image resolution * colour depth

6
Q

What is Sample rate

A

Number of samples taken per second

7
Q

What is sampling resolution

A

The number of bits used to represent sound amplitude in a digital sound recording.

8
Q

What is bit depth

A

Number of bits used to represent the smallest unit in a sound file

9
Q

How to calculate file size of a mono sound file

A

Sample rate * sample resolution * length of sample * number of channels

10
Q

What is a bit

A

Basic computing Element that is either 0 or 1.

11
Q

What is compression

A

Reduction in file size by removing or reorganising redundant or repeated pieces of data

12
Q

What are the two types of compression

A

Lossy
Lossless

13
Q

What is lossy compression

A

The file compression algorithm eliminates unnecessary data from the file. This means the original file cannot be reconstructed once it has been compressed. Eg: MP3, JPEG

14
Q

What happens when lossy compression is applied

to an img
to a sound file

A

img - reduce the resolution and/or the bit/colour depth

sound - reduce the sampling rate and/or the resolution.

15
Q

What is lossless compression

A

A file compression method that reorganises runs of data to compress the file. The original file can be fully restored.

16
Q

What is Run Length Encoding

A

A lossless file compression technique is used to reduce the size of text and photo files in particular

17
Q

What is an error code

A

Error messages that contain numbers that refer to the memory location of the error and are usually automatically generated by the computer

18
Q

What is ASCII code

A

A character set for all the characters on a standard keyboard and control codes.

19
Q

What is Unicode

A

A character set which represents all the languages of the world

20
Q

Applications of hexadecimals

A

MAC Address
IP Address
Representing colours
Error codes

21
Q

What is an overflow error

A

When there are more bits than the register can handle

22
Q

What directions means what operation in Binary Shifting

A

Right shift = division
Left shift = multiplication

23
Q

What is the MAC address

A

Uniquely identifies a device on the internet

24
Q

How many bits does the MAC address have?

A

48 bits - 6 pairs of hexadecimal values

25
Q

What is the IP address

A

Gives a unique address to each device connected to a network identifying their location

26
Q

IPv4

A

32 bit number
separated by ‘.’

27
Q

IPv6

A

128 bit number
separated by ‘:’
16 bit chunks (4 hex numbers:4 hex numbers)

28
Q

MP3 sound files

A

A form of lossy compression where the original file size is reduced by 90%
Lossy compression removes frequencies outside human hearing range
Perceptual music shaping

29
Q

What is perceptual music shaping

A

If two sounds are playing at the same time, the softer one is removed.

30
Q

JPEG

A

Lossy file compression.
Bitmap image which is very large becomes a JPEG file after lossy compression

Human eyes can’t detect changes in colour as well as brightness.
Separates pixel colour from brightness, images can be split into 8 x 8 pixel blocks, and allows certain information to be discarded

31
Q

MP4

A

Similar to mp3 except mp4 allows videos, photos, animations and music.

32
Q

Why data is compressed

A

»save storage space

»reduce the time taken to stream a music or video file

»reduce the time taken to upload, download or transfer a file across a network

»reduced file size also reduces costs

33
Q

How to convert from binary to denary

A

Each value in the binary number is a power of 2

1 1 1 1
8 4 2 1

34
Q

How to convert from denary to binary

A

Subtract powers of 2 until remainder is 0

12 in binary is
12- 8 = 4 -4 = 0

1100

35
Q

How to convert binary to hexadecimal

A

take binary in groups of 4 and see what denary value they have

convert that denary value of hex

eg
1111000011111
1111 | 0000 | 1111
15 | 0 | 15
F0F

36
Q

How to convert hex to binary

A

convert each digit to groups of 4 binary digits

37
Q

How many bits does ascii contain
how many does extneded ascii contain

A

7 bits (127 diff characters)
8 bits (255 diff characters)

38
Q

Disadvantage of ascii

A

it does not represent characters in non-Western languages

39
Q

What does the fact that unicode representing all languages in the world allow it to do

A

support many operating systems, search engines and internet browsers used globally.

40
Q

5 goals of unicode

A

» create a universal standard that covered all languages and all writing systems

» produce a more efficient coding system than ASCII

» adopt uniform encoding where each character is encoded as 16-bit or 32-bit code

» create unambiguous encoding where each 16-bit and 32-bit value always represents the same character

» reserve part of the code for private use to enable a user to assign codes for their own characters and symbols

41
Q

Diff between unicode and ascii

A

Ascii:
» 7 or 8 bits
» Only represents western language and control codes
» no reserved space in code for private users to assign codes for characters and symbols

unicode:
» more bits per character than ascii (16 or 32)
» represents all languages of the world
» reserve part of the code for private use to enable a user to assign codes for characters and symbols

42
Q

What does sampling mean
how is it done

A

measuring the amplitude of the sound wave

using an ADC - analogue to digital converter. Converts the sampled sound to binary.

43
Q

How is accuracy of the sampled sound varied

what else does this impact

A

by changing the sampling resolution or rate

impacts the file size as well

44
Q

How is sampling used to record a sound clip

A

» the amplitude of the sound wave is first determined at set time intervals (the sampling rate)
» this gives an approximate representation of the sound wave
» each sample of the sound wave is then encoded as a series of binary digits.

45
Q

Benefits of using a larger sampling resolution

A

larger dynamic range

better sound quality

less sound distortion

46
Q

Drawbacks of using larger sampling resolution

A

produces larger file size

takes longer to transmit/download music files

requires greater processing power

47
Q

how much is 1 (in bytes):

kibibyte
mebibyte
kilobyte
megabyte

A

KiB 2^10
MiB 2^20

KB 1^3
MB 1^6

48
Q

Difference between mp3 and mp4

A

MP4:
format allows the storage of
multimedia files rather than just sound

lossy compression applied both to the video and the sound.

49
Q

Characteristics of RLE (lossless)

A

» it is a form of lossless/reversible file compression

» it reduces the size of a string of adjacent, identical data

» a repeating string is encoded into two values

» RLE is only effective where there is a long run of repeated units/bits

50
Q

In RLE

what is the first value
what is the second value

A

the first value represents the number of identical data items

the second value represents the item/data itself.

51
Q

What is a flag in RLE

what happens if it is not used for a particular data block

when is it used

A

A flag preceding data indicates
that what follows are the number of repeating units

When a flag is not used, the next byte(s) are taken with their face value and a run of 1

when is it used - when standard RLE is not effective. Data may not be in long runs. This allows RLE to be more effective.