Data Representation Flashcards
The difference between analog and digital data? (3 marks)
- Analog is continuous while digital is discrete
- Analog can be represented physically while digital data can only represented in 0, 1
- Digital data can only represent a certain amount of values while analog can represent any values within a range
Why is binary used? (2 marks)
- Because computer is made of transistors and circuit
- So turning on and off to represent 1 & 0 is the simplest way to output data.
Difference between binary, denary and hexadecimal ( 1 mark)
- Binary: base 2
- Denary: base 10
- Hexadecimal: base 16
Explain hexadecimal number base (3 mark)
- It is written in groups of 4 digits
- From 1->9, hexadecimal base is similar to denary
- From 10-> 15, it will start from A-> F
Addition binary rules (4 marks)
0 + 0 = 0
0 + 1 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
What is MSB (Most significant bit) and LSB (Least Significant Bit)
- MSB is on the left as it contains larger numbers
- LSB is on the right as it contains smaller numbers
What is sample rate and sample resolution?
- Sample rate is how often the amplitude is recorded in 1 sec
- Sample resolution is the number of bits a sample can record
How to caculate sample size?
Sample rate * Sample resolution * duration
How to calculate bitmap size?
Height pixel * Width pixel * color depth
How to calculate color depth?
- First, we need to count up the amount of different numbers ( Ex: 8 color)
- Then, we should know that 1 bit can carry 2 numbers (0,1)
=> 3 bits can carry 8 numbers.
1 byte = ? bits
1 kB = ? bits
- 8 bits
- 8192 bits
Definition of lossy and lossless
- Lossy is permanently deleting data to reduce the file size
- Lossless is using an algorithm to recognize patterns of the file in which it will then re-construct the file with smaller file size.
-RLE ( run-length encoding): is an example for the algorithm that is lossless. It minimizes the data by recording how many times it is repeated and represents it with a shorter code/text.
Compare and contrast lossy and lossless? ( 3 marks)
Compare:
- Lossy and lossless are both methods to reduce file size
Contrast:
- Lossy will permanently delete the data while we can recover the original files using lossless.
- Lossy can’t be used with text while lossless can used with every type of data ( Sound, Image, Text)
MP4 is lossy or lossless?
Lossy
PNG is lossy or lossless?
Lossless