SECTION 3: Data Representation Flashcards

(59 cards)

1
Q

What number base is binary?

A

Base 2 (uses only 0 and 1)

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

What number base is decimal?

A

Base 10 (uses digits 0–9)

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

What number base is hexadecimal?

A

Base 16 (uses 0–9 and A–F)

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

How do you convert binary to decimal?

A

Multiply each binary digit by 2ⁿ (starting from the right at n=0) and add the results.

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

How do you convert decimal to binary?

A

Repeatedly divide by 2 and record the remainders (bottom to top gives binary).

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

How do you convert binary to hexadecimal?

A

Split binary into 4-bit groups from right, convert each group to hex.

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

How do you convert hexadecimal to binary?

A

Convert each hex digit into 4-bit binary.

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

How do you convert decimal to hexadecimal?

A

Convert decimal to binary, then binary to hex (or divide decimal by 16 directly).

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

How do you convert hexadecimal to decimal?

A

Multiply each hex digit by 16ⁿ (starting from right at n=0) and add the results.

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

What is binary addition?

A

Adding binary digits using rules: 0+0=0, 0+1=1, 1+1=10 (carry), 1+1+1=11

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

What can binary addition lead to?

A

Overflow – when result exceeds the storage capacity.

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

What is a binary shift?

A

Moving binary digits left or right.

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

What does a left binary shift do?

A

Multiplies the number by 2ⁿ.

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

What does a right binary shift do?

A

Divides the number by 2ⁿ (loses precision).

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

What is character encoding?

A

A system that maps characters to binary numbers.

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

What is ASCII?

A

7-bit character set for English letters, numbers, symbols (128 characters).

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

What is extended ASCII?

A

8-bit character set (256 characters) including accented letters.

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

What is Unicode?

A

A universal character set supporting many languages; uses 8–32 bits.

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

Why use Unicode over ASCII?

A

Supports more symbols and global languages.

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

What is a pixel?

A

The smallest unit of a digital image.

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

What is resolution?

A

The number of pixels in an image (width × height).

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

What is colour depth (bit depth)?

A

The 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
23
Q

What does a higher colour depth allow?

A

More available colours but a larger file size.

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

What is metadata in an image file?

A

Extra data such as width, height, colour depth, file type.

25
What is the formula for calculating image file size (in bits)?
Width × Height × Colour depth.
26
How do you convert image file size from bits to bytes/kilobytes?
Divide by 8 for bytes, then divide by 1024 for kilobytes.
27
What is sampling?
Measuring the amplitude of a sound wave at regular intervals.
28
What is the sample rate?
The number of samples taken per second (measured in Hz).
29
What is sample resolution (bit depth)?
The number of bits used to store each sample.
30
What effect does increasing sample rate or resolution have?
Higher quality audio and larger file size.
31
What is the formula for sound file size (in bits)?
Sample rate × Duration × Bit depth × Number of channels.
32
What is data compression?
Reducing the size of a file.
33
Why compress data?
To reduce storage space and speed up transmission.
34
What is lossy compression?
Removes some data permanently to reduce file size.
35
What is lossless compression?
No data is lost; the original file can be fully restored.
36
Give examples of lossy file types.
JPEG, MP3, MP4.
37
Give examples of lossless file types.
PNG, FLAC, ZIP.
38
Advantage of lossy compression?
Smaller file sizes, faster download/upload.
39
Disadvantage of lossy compression?
Reduces quality and cannot restore original.
40
Advantage of lossless compression?
Original quality is preserved.
41
Disadvantage of lossless compression?
File sizes are larger than lossy.
42
What is Huffman coding?
A method of lossless compression that assigns shorter codes to more frequent characters.
43
What is a frequency table in Huffman coding?
A table showing how often each character appears.
44
What is a Huffman tree?
A binary tree built using frequency values, combining least frequent characters first.
45
How do you assign binary codes in a Huffman tree?
Left branch = 0, Right branch = 1; follow from root to leaf.
46
Why is Huffman coding more efficient than ASCII?
It uses fewer bits on average per character.
47
How do you calculate size savings using Huffman vs ASCII?
Compare total bits needed with 8-bit ASCII vs Huffman-assigned codes.
48
What is a bit?
Single binary digit (0 or 1)
49
What is a nibble?
4 bits
50
What is a byte?
8 bit
51
What’s the difference between b and B?
b = bit, B = byte
52
Why use hexadecimal?
Easier to read than binary
53
How many bits does 1 hex digit represent?
4 bits
54
What is RLE?
Stores repeated data as value + count
55
Example of RLE on “AAAABBB”?
4A3B
56
Is RLE lossy or lossless?
Lossless
57
One downside of RLE?
Can increase size if little repetition
58
What is bit rate?
Bits used per second of audio
59
Three uses of hexadecimal:
Colour values in photo editing software/HTML MAC addresses Memory address locations in assembly language