Data Flashcards

1
Q

Why do computers use

binary?

(Long explanation + short explanation)

A

We live in an analogue world since colours and sounds are all described by real numbers - there are an infinite number of them. (This is also referred to as continuous data.)

Digital signals and objects deal in the realm of the finite, meaning there is a limited set of values they can be.

Computers are made of digital switches (transistors) that can either be on or off. We use binary digits (bits) to represent their state.

Using binary values allows us to represent information on the transistors that make up a computer.

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

What is the relationship between

length of binary pattern and number of states that can be represented?

A

number of states that can be represented = 2^number of bits (in the binary pattern)

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

What are

decimal multiple of bytes used for?

A

data transmission speeds

i.e. kilobyte (kB), megabyte (MB) …

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

What are

binary multiples of bytes used for?

A

file sizes

i.e. kibibyte (KiB), mebibyte (MiB) …

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

What are the

multiples of bytes?

(in ascending order)

A

burger - byte
king - kibibyte/kilobyte
made - mebibyte/megabyte
great - gigibyte/gigabyte
toast - tebibyte/terabyte
previously - pebibyte/petabyte
(but - bit
now?) - nibble

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

Define

overflow error.

A

the error that ocurs when the number of bits reserved for the result of a calculation are not enough to store all the bits from the number

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

What is

two’s complement?

A

a method that allows for negative number representation where the most significant bit is negative

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

How would you

convert negative denary numbers to two’s complement?

(3 steps)

A
  1. Turn the negative denary number into a positive binary number.
  2. Flip the bits (0 -> 1, 1 -> 0).
  3. Add 1.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are

binary shifts?

A

shifts that are used to move all the bits in a binary pattern left or right

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

What are

logical shifts

A

shifts that treats all the bits of a binary pattern in the same way, irrespective of what the pattern represents

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

Why can

loss of precision occur during a logical shift right?

A

because one or more of the right-most bits are discarded during the shift

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

What is special about an

arithmetic shift right?

and what is this good for?

A

the most significant bit is preserved

this is good because it gives us the ability to divide negative numbers

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

What are some

positives of hexadecimal?

(3)

A
  • it takes up less space on the page to write numbers
  • you make fewer mistakes when writing large numbers
  • it is quicker to write down/copy/transcribe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is

ASCII?

and what does it stand for?

A

a 7-bit character set

American Standard Code for Information Interchange

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

Define

colour depth.

A

the number of bits used to encode the colour of each pixel

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

What is

image size?

A

the total number of pixels along an image’s width and height

17
Q

What is

resolution measured in?

A

pixels per inch (PPI)

aka dots per inch (DPI)

18
Q

What equaiton links

physical width, image width and resolution?

A

image width = physical width x resolution

width can be replaced with height

19
Q

What is the equation for

image size in bytes?

A

image size in bytes = (number of pixels x colour depth) / 8

20
Q

Define

amplitude.

A

the extent to which air particles are displaced

in other words, the loudness of the sound

21
Q

Define

bit depth.

(in relation to represnting sound)

A

the number of bits stored per sample

the higher the number of bits, the greater the quality of the sound, and the larger the file size

22
Q

Define

sample interval.

A

the amount of time which passes between capturing each sample

23
Q

Define

sample rate.

A

the number of samples stored per second

the higher the number of samples per second, the higher the quality of the sound, and the larger the file size

24
Q

What is

FLAC used for?

and what type of compression does it use?

A

sound

lossless

25
Q

What is

JPEG used for?

and what type of compression does it use?

A

image

lossy

26
Q

What is

MP3 used for?

and what type of compression does it use?

A

sound

lossy

27
Q

What is

WAV used for?

and what type of compression does it use?

A

sound

uncompressed

28
Q

What is

ZIP used for?

and what type of compression does it use?

A

file archives

lossless

29
Q

What is

PNG used for?

and what type of compression does it use?

A

image

lossless

30
Q

What is

MP4 used for?

and what type of compression does it use?

A

video

lossy

31
Q

What is

BMP used for?

and what type of compression does it use?

A

image

uncompressed

32
Q

What does

lossless compression do?

A

reduces the size of a file while retaining the exact meaning of the original data

33
Q

What does

lossy compression do?

A

reduces the size of a file (by up to 90%) by permanently deleting some of its data