Computer science Flashcards

Revise for computer science exam

1
Q

Give me the sizes for units of data:

A

Bit: 1 or 0
Nibble: 4 bits
Byte: 8 bits
Kilobyte: 1000 bytes
Megabyte: 1000 kilobytes
Gigabyte: 1000 megabytes
Terabyte: 1000 gigabytes
Petabyte: 1000 terabytes

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

Why do overflow errors occur?

A

Occurs when a number has too many bits.

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

Give me the operation when shifting binary digits to the left and the right.

A

Left shifts: multiply a binary number for every place shifted to the left, the number is doubled.
Right shift: divide a binary number for every place shifted to the right, the number is halved.

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

What can left shifts and right shifts cause?

A

Left shifts can cause overflows and right shifts can cause loss of data or its accuracy.

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

What are pixels?

A

A simple point in a graphical image.

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

What is a bitmap?

A

Stores each individual pixel.

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

What is color depth?

A

Number of bits needed to represent each pixel.

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

What is a vector?

A

The mathematical equation to draw the image.

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

What is the formula to calculate the number of colors using a the color depth?

A

Total number of colors = 2 to the power of n
n = number of bits per pixel.

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

What is image resolution?

A

Number of pixels in an image.

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

What happens if the resolution is increased?

A

The higher the resolution the higher the quality of the image but they also increase file size.

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

What is the formula for resolution?

A

width x height

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

What is the formula to workout the file size( in bits)

A

file size (in bits) = image resolution x color depth.

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

What is Metadata?

A

Metadata is the information stored in an image file which helps the computer recreate the image on screen from the binary data in each pixel.

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

Metadata includes the images :

A

File format, height, width, color depth and resolution.

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

What would happen without metadata?

A

Devices would not be able to display the image on screen as intended.

17
Q

What are analogue signals?

A

Pieces of continually changing data.

18
Q

Why do analogue signals need to be converted?

A

Analogue signals need to be converted into digital data so that computers can read and store sound files.

19
Q

What device allows analogue signals converted?

A

Using analogue digital converters.

20
Q

What is sampling?

A

The process of converting analogue signal to digital.

21
Q

How do we convert analogue signals?

A

We sample the amplitude of the wave at regular intervals.

22
Q

Relationship between amplitude and bit depth?

A

Amplitude can only take certain values depending on the bit depth.

23
Q

What are the characteristics of digital data after being converted from analogue signals?

A
  1. Not continuous
  2. Lost a lot of data.
24
Q

How can digital data be improved?

A

By taking samples more regularly.

25
Q

What is sample rate or sampling frequency?

A

How many samples took in a second.

26
Q

What is the measurement taken for sample rate?

A

Hz or Hertz

27
Q

What is bit depth?

A

Number of bits available for each sample.

28
Q

What is the formula to calculate the size of a sound file (in bits)

A

File size (in bits) = sample rate (in Hz) x bit depth x duration (in seconds).

29
Q

What is data compression?

A

When we make file sizes smaller while trying to make the compressed file as true to the original as possible.

30
Q

What are the uses of data compression?

A
  1. Takes up less storage space on computers.
  2. Streaming and downloading files become quicker as they take up less bandwidth.
  3. Allows web pages to load more quickly.
  4. Email services usually have restrictions on the size of the attachment you can send. Compressing the file size allows you to send the same content with a much smaller file size.
31
Q

What are the 2 types of compression?

A

Lossy and lossless

32
Q

What is Lossy compression?

A

Permanently removes data from the file.

33
Q

What is lossless compression?

A

Makes the file smaller by temporarily removing data to store the file then it restores it to its original state.

34
Q

What are the pros and cons of lossy compression?

A

Greatly reduced file size, takes up less band width and commonly used.
Loses data, cant be used on text or software files, worse quality but normally unnoticeable.

35
Q

What are the pros and cons of lossless compression?

A

No reduction in quality, Can be decompressed and turned back to the original, can be used on text and software files.
There is only a slight reduction in file size.