Digital Information: Converting Analog Data to Binary Flashcards

1
Q

can you store more BIG files in a computer or small files

A

small

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

compression

A

algorithms to reduce the amount of space needed to represent a file

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

how many types of compression are there and what are they

A

lossless and lost (2)

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

lossless compression

A

algorithms reduce the size of files without losing any information in the file

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

lossy compression

A

algorithms reduce the size of files by discarding the less important information in a file

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

what type of compression affects file quality? explain why

A

lossy because some info is taken away from the files while in lossless they are reduced without taking anything away

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

how do computers compress text

A

by finding repeating phrases (common) and making them a sign

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

example of how text is compressed in real life

A

like how people say u instead of you or lol instead of out loud

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

what can be compressed

A

things that repeat at least twice in a sequence

phrases, words, parts of words (th) [like the in the, this, thought,etc.]

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

all text files can be compressed
true or false

A

false

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

compression always makes a smaller file
true or false

A

false because sometimes it can require more bytes

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

how do computers compress image files (what process)

A

run length encoding (RLE)

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

why is it particularly important to compress image files

A

bc they’re like super fat files that take up a bunch of space

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

how does RLE work

A

the computer replaces each row (of the image – like the little boxes) with numbers that say how many consecutive pixels are the same color (like 5 reds)

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

RLE always starts coding with the number of _____ pixels

A

white

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

if a row does not start with the color white then how is RLE coded

A

it just begins with 0 whites

17
Q

how would a row with: 3 white pixels, 2 red pixels, 5 white pixels, 2 red pixels, then 4 white pixels be represented

A

with the bit representations of the numbers 3,2,5,2,4

18
Q

can you make a perfect representation of an image from RLE coding

A

yes

19
Q

does RLE coding always reduce the size of a file? why or why not?

A

no because it is very rare that the same exact color repeats over and over again so you will need different combinations of 0 and 1 to show different numbers so it would be super long and so much stuff yk which would be a bigger file

20
Q

where is RLE used irl

A

fax machines

21
Q

why do fax machines use RLE

A

bc they only print in black and white

22
Q

Huffman coding

A

assigning shorter codes to more frequently occurring characters and longer codes to less frequent characters

23
Q

all types of compression code in what

A

bits

24
Q

example of huffman coding

A

A and G are assigned one more bit because they are the least common letters in the sequence.

If they were only assigned 2 bits, there would be confusion when decoding messages. Imagine we had the following code:
a - 01
c - 00
g - 10
t - 1

If I asked you to decode the message 101, it would not be clear whether the original message was ta or gt.