3. Fundamentals of data representation Flashcards

1
Q

What are the three number bases?

A

denary (base 10)
binary (base 2)
hexadecimal (base 16)

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

What base do computers use to represent all data and instructions?

A

binary

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

Why is hexadecimal often used in computer science? (2)

A
  • large numbers can be stored using fewer digits (is a form of short-hand for coders as they do not want to type loads of 1s and 0s)
  • easy to converted denary to hex to binary and vice versa

note: computers do everything in binary, only humans use hex and denary

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

convert 8D (hex) to binary
(and show working)

A

10001101

8D
= 8 D
= 1000 1101
= 10001101

(you separate each character into its 4 digit binary equivalent)

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

convert 10010100 (binary) to hex

A

94

Convert every 4 binary digits (from bit0) to hex digit
10010100
= 1001 0100
= 9 4
= 94

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

what is the smallest/fundamental unit of information?

A

a bit (either 0 or 1)

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

how many bits is a byte

A

8 bits

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

write out the prefixes for bytes in ascending order

A

kilo
mega
giga
tera

all go up by 1000

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

When can binary shifts be used?

A

Binary shifts can be used to perform simple multiplication/division by powers of 2, with multiplication shifting to the left and division shifting to the right.

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

What is a character set?

A

All of the characters that a computer can use are called a character set

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

how many bits are in extended ASCII? (1)
how many characters in the character set? (1)
what is the purpose of extended ASCII? (1)
which languages is extended ASCII suitable for? (1)

A

Extended ASCII uses eight bits (1), giving a character set of 256 characters (1). This allows for special characters such as those with accents in some languages (1) such as French and Spanish (1).

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

how many bits are in unicode? (1)
how many characters in the character set? (1)
what is the purpose of unicode? (1)
which languages is it suitable for? (1)

A

Unicode is a character set which uses 16 bits (1), giving a range of over 65,000 characters (1). It is suitable for languages that contain hundreds to thousands of characters (1) such as Chinese or Arabic (1).

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

Know that Unicode uses the same codes as ASCII up to 127.

A

do u know it?

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

What is the purpose of Unicode and the advantages of Unicode over ASCII?

A

Students should be able to explain the need for data representation of different alphabets and of special symbols allowing a far greater range of characters.

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

What is a pixel (and what is it short for)?

A

A pixel is a single point in an image and is short for picture element

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

How do you calculate the size of a bitmap?

A

width (in pixels) x height (pixels)

17
Q

What is colour depth?

A

Colour depth is the number of bits used to represent each pixel.

18
Q

How do you calculate an image file size?

A

Size = (bits) = W x H x D

Size = (bytes) = (W x H x D)/8

W = image width

H = image height

D = colour depth in bits.

19
Q

sample

A

A sound measurement taken at a given point in a sound file

20
Q

amplitude

A

The size of the sound wave

21
Q

What type of data is raw, unedited sound?

A

Analogue

22
Q

How do analogue signals become digital sound?

A
  • By the process of sampling.
  • Where the amplitude of the sound wave is measured at regular intervals in time (for the sound)
23
Q

sampling rate

A

Sampling rate is the frequency at which a sample of a sound file is taken and is usually measured in hertz (1 hertz = 1 sample per second).

24
Q

sample resolution

A

Sample resolution is the number of bits per sample/ how much data is needed to store a sample.

25
Q

How do you calculate sound file sizes?

A

File size (bits) = rate x res x secs

rate = sampling rate

res = sample resolution

secs = number of seconds

26
Q

What is data compression?

A

Reducing the size of a certain file

27
Q

Why might data be compressed? (4)

A
  • file may be too big to store
  • file may be too big to transmit to someone else or too big to download
  • to reduce the amount of storage space used on the hard drive
  • to make downloading or transmitting a file quicker
28
Q

lossy compression

A

File compression method that permanently removes redundant data

29
Q

lossless compression

A

A file compression method that does not remove any data but compresses data by looking for a repeating pattern

30
Q

look at smth on Huffman coding idk how to make a flashcard of it

A
31
Q

look at something on Run-length Coding (RLE)

A
32
Q

RLE pros and cons

A

pro: works well in images that have blocks of the same colour, and text that has repeating symbols

con: isn’t ideal for text written in english, compression string may be larger than the actual string

33
Q

Huffman Coding pros and cons:

A

pro: compresses text very well
con: huffman trees have to be made for each string that is compressed; using a tree made from a different string might not be as efficient