3.3 - data representation (5 + 8) Flashcards

3.3.5 - Character Encoding 3.3.8 - not finished

You may prefer our related Brainscape-certified flashcards:
1
Q

define a character set

A

all the characters a computer can use with their corresponding binary code used to represent each character

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

why were binary codes created?

A

typing out 1s and 0s takes too long, so binary codes were created to represent each character

(you press character and it is converted into binary)

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

how many bytes is one character in ASCII?

and so how many bits?

A

1 character = 1 byte

7 bits

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

how many characters are there in ASCII?

A

128

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

why was Unicode created?

A

for languages that used a different alphabet set to the English language

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

how many characters can be represented using 8 bits?

and what would this type of character set be called?

A

256

extended ASCII

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

what number codes for A to Z in ASCII?

A

65 to 90

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

what number codes from a to z in ASCII?

A

97 to 122

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

convert 88 into hexadecimal

A

1) do 88/16 = 5
2) calculate the remainder = 8
3) then convert 8 to hexadecimal (which is also 8)

FINAL ANSWER - 58

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

what is Unicode (in terms of storage)?

A

8 to 32 bits

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

what is the equation to calculate the total number of bits stored (uncompressed)?

A

7 (ASCII bits per character) x total frequency of (all) characters

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

what is the equation to calculate the total number of compressed bits - huffman’s compression?

A
  • addition of total bits used = x

x times by frequency

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

similarities between Unicode and ASCII?

A

they both use the same codes up to 127

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

why do we compress a file?

A
  • it is too big for us to store or transmit to someone else

- reduce size of file on hard drive

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

what happens when you compress a file?

A

the structure of the data is manipulated + the size is smaller

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

what is run length encoding?

A

form of compression effective when dealing with repeating data (data stored once with amount of time it is repeated)

ie. z8

17
Q

what is lossless compression?

and give two examples

A

reduces the size of file without permanently removing data

  • ie. run length encoding
  • huffman coding
18
Q

what is lossy compression?

A

reduces size of file by permanently removing data
- ie. data which is thought to be redundant

  • decreases quality of image to reduce size
19
Q

state two examples of lossy compression

and if applicable, how it works

A

JPEG

MP3 - removes frequencies out of human hearing

20
Q

convert 200 to hexadecimal

A

1) 200/16 = 12 = C
2) calculate remainder = 8
3) convert remainder into hexadecimal = 8

FINAL ANSWER = C8

21
Q

how do you convert between hexadecimal and denary?

A

multiply first value by 16

then multiply second by 1

add together

22
Q

convert the following to denary:

a) 9E
b) 7F
c) F3

A

a) 9 x 16 = 144
E = 14
14 x 1 = 14
144 + 14 = 158

b) 7 x 16 = 112
F = 15, 15 x 1 = 15
112 + 15 = 127

c) 15 x 16 = 240
3 x 1 = 3
240 + 3 = 243

23
Q

how do you convert between denary and binary?

A

divide the denary number by tops on the table

24
Q

convert 111 into binary

A

128 64 32 16 8 4 2 1

0 1 1 0 1 1 1 1

25
Q

how do you convert from binary to denary?

A

add up each column with a value up

26
Q

how do you convert from binary to hexadecimal?

A

1) convert it into a denary value

2) then convert that into hexadecimal

27
Q

convert 10101101 to denary

A

128 64 32 16 8 4 2 1
1 0 1 0 1 1 0 1

and so… 173

28
Q

convert 11000101

into hexadecimal

A

denary - 197

hexadecimal - C5

29
Q

how does lossless compression compress data?

A

looks for repeating patterns and compresses data

30
Q

how do you calculate the total number of bits needed to store a piece of data compressed using huffman’s coding?

A

number of bits (for one character) x frequency

ie. if code is 0101 = 4 bits needed
ie. if letter appears 5 times

then total number of bits = 20

  • add all the letters together
31
Q

how do you calculate the number of bits needed to store an uncompressed data in ASCII?

A

7 * total frequency

7 because ASCII needs 7 bits to store data

32
Q

how do you calculate the number of bits saved when compressing a piece of data using huffman’s coding?

A

uncompressed - compressed = ANS

ANS / uncompressed

33
Q

represent 0000011100000011 in RLE

A

5 0 3 1 6 0 2 1