3 - Data representation Flashcards

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

Why is hexadecimal often used in computer science?

A

-easier for people to read/remember (shorter representation)
-faster to convert to/from binary

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

Why can’t you use hexadecimal to save storage space on a computer?

A

computers only read/understand binary, so it will be stored as binary and not hex

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

What are binary shifts?

A

multiplying/dividing a binary number by a power of 2 by shifting all the digits up/down

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

What is a character set?

A

all the symbols that can be understood and displayed by a computer

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

What does ASCII stand for?

A

American Standard Code for Information Interchange

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

How many bits does ASCII use, and how many characters can be represented using this many?

A

7

(2⁷=) 128

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

Why is Unicode often used over ASCII?

A

more characters can be represented

uses 16 bits usually but you don’t need to know that

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

How is Unicode similar to ASCII?

A

the first 127 characters of Unicode are all of the ASCII characters

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

What is colour depth?

A

number of bits used to represent the colour of each pixel

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

What is a pixel, and what is it short for?

A

-smallest addressable point in an image

-picture element

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

What is a bitmap?

A

an array of pixels used to make an image

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

How is analogue sound recorded so that it can be stored on a computer?

A

analogue sound signals are sampled at regular intervals as a series of bits to convert it to digital

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

What is a sample, and what is sampling rate?

A

-a measure of the amplitude of a sound at a point in time

-sampling rate is the number of samples recorded in a given time

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

Give an advantage of using a higher sampling rate:

A

the resulting digital sound is a closer representation of the analogue sound

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

Define sampling resolution:

A

number of bits per sample of audio

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

What are the 2 types of compression?

A

-lossless (no reduction in quality, can be used on text)
-lossy (original data cannot be reconstructed)

17
Q

What does Huffman encoding do to data?

A

takes most frequently used data and assigns it a bit pattern with the least number of bits

A form of lossless compression

18
Q

How do you construct a Huffman tree?

A

-create a frequency table of all the characters used (including spaces)
-write them in a line in order of frequency
-pair up adjacent letters with the smallest frequency, and add their frequencies up to get another value to put above
-repeat the pairing process until you get 1 value at the top (total number of digits)

-assign left/right to be 0/1, find bit pattern for each letter

19
Q

How does run length encoding (RLE) compress data?

A

-takes a string of bits
-stores it in frequency-data pairs (eg 4x1s means 1111)

Not necessarily in that format of 4x1s

RLE can sometimes increase the file size if there aren’t many bits in the first place

20
Q

Why is data compressed?

A

-to reduce its file size so it decreases the amount of storage it takes up
-to make it faster to transmit as it takes up less bandwidth