data representation Flashcards
use of ordinal number
to describe the numerical positions of objects
use of natural number
for counting
use for real numbers
for measurement
base number for decimal
10
base number for binary
2
base number for hexadecimal
16
pros for hexidecimal
more compact
takes less space
bit
fundamental unit of information
byte
group of 8 bits
binary prefix for kibi, mebi, gibi, tebi
kibi, Ki - 2^10
mebi, Mi - 2^20
gibi, Gi - 2^30
tebi, Ti - 2^40
binary prefix for kilo, mega, giga, tera
kilo, k - 10^3
mega, M - 10^6
giga, G - 10^9
tera, T - 10^12
difference between unsigned binary and signed binary
unsigned: holds only positive numbers
signed: holds positive and negative numbers
the minimum and maximum values for a given number of bits, n fo a unsigned binary
0 and 2^n -1
explain why both fixed point and floating point representation of decimal numbers may be inaccurate
Rounding errors can occur
Relative Error
e.g. calculate the relative error of 0.94 +- 0.2:
(0.2 / 0.94 ) x 100
Absolute Error
in 0.94 +- 0.2 , the 0.2 is the absolute error
Compare the advantages and disadvantages of fixed point in terms of range, precision and speed of calculation
pros:
Numbers are represented with precision
cons:
Limited range
Compare the advantages and disadvantages of floating point in terms of range, precision and speed of calculation
pros:
Provides a large range
cons:
Rounds off large numbers which is time consuming
why are floating point numbers normalised
To increase consistency. If each number is represented always by the same bit pattern comparisons would become easier
Overflow
When the result of addition or subtraction goes beyond range
Underflow
When the result of addition or subtraction is less than the range
Differentiate between the character code representation of a decimal digit and its pure binary representation
pure binary representation:
Represents numbers using only 0s and 1s in their binary form
character code representation:
It allows for the representation of decimal digits and characters such as letters, symbols, and control characters
ASCII and unicode
Binary coding system for characters and numbers
Binary coding system that includes international characters
explain why Unicode is preferred
Unicode can represent characters from different languages around the world
check digit
Digit calculated using an algorithm and is generated using other digits in a sequence
check sum
checks codes for errors during data transmission by calculating
the sum of transmitted digits
majority voting
Method of checking errors by producing the same data several times and checking if it’s the same each time
parity bits
A method of checking binary codes by counting the number of 0s and 1s in code
difference in analogue and digital data
Analogue is continuous data
Analogue Data:
Represents data using continuous values
Can have an infinite number of possible values
digital data:
Represents data using discrete values
Limited number of possible values
difference in analogue and digital signal
analogue signals:
represented as wave forms
Values vary smoothly over time
digital signals:
represented as binary digits
Values are specific and discrete
what are ADCs used with
analogue sensors
most common use for a DAC
to convert a digital audio signal to an analogue signal
Explain the principles of operation of an ADC
The analogue signal is sampled at fixed time intervals
bitmaps represented as pixel grid
each pixel corresponds to a single point in the image. The grid is organized in rows and columns
bitmaps represented as color depth
The color depth determines the number of bits used to store color information for each pixel.
bitmaps represented as Pixel Values
value of each pixel in a bitmap is stored as binary data
bitmaps represented as file format
Bitmaps are typically stored in files using specific formats such as BMP PNG, or JPEG
resolution
number of dots per inch
colour depth
number of bits stored for each pixel
resolution of image
size of image
calculate storage requirements
size in pixels x colour depth
metadata
e.g. width, height, colour depth
size of image in pixels
width of image in pixels x height of image in pixels
Explain how vector graphics represents images using lists of objects
The properties of each shape in the vector graphic image are stored as a list
Give examples of typical properties of objects
co-ordinates
fill colour
line colour
vector graphics approach advantages and disadvantages.
Uses mathematical equations to define shapes and lines
Can be edited and resized easily
Smaller file sizes
Scalable without losing quality
Not suitable for complex and detailed images
Limited in representing continuous-tone images
bitmapped graphics approach advantages and disadvantages.
Uses a grid of pixels to represent images.
Well-suited for complex and detailed images
Can represent continuous-tone images
Larger file sizes
Not easily scalable without losing quality
sample resolution
The number of bits used to represent a single sample
sample rate
The number of samples taken per second
Nyquist theorem
sampling rate is twice the highest frequency in the original sound
Calculate sound sample sizes in bytes
Sample Size (in bytes) = (Bit Depth / 8) * Number of Channels
Describe the advantages of using MIDI files for representing music.
More compact
Easy to modify
Purpose of midi
To easily edit files and exchange data
why images and sound files are often compressed
To reduce files which helps streaming or downloading files
Advantage and disadvantage of lossless
Files can be reproduced exactly as it was in the beginning with no loss in quality but still result in a large file size
No redundant data is lost during the compression process
Advantage and disadvantage of lossy
Files are reduced significantly more than lossless but has a loss in quality
run length encoding (RLE)
compresses data by reducing repetitive and consecutive data called runs. Runs of data are stored as a single data value and count rather than the original run
dictionary-based methods
Variable length strings of data are represented by single tokens
A dictionary is formed using the tokens as the key
The strings of symbols are used as the entries
encryption
Using an algorithm to convert a message into cipher text
why it caesar cipher easily cracked
There are only 25 possible keys which comes to process of elimination
Explain why Vernam cipher is considered as a cypher with perfect security.
Harder to crack
Compare Vernam cipher with ciphers that depend on computational security
Vernam cipher is the only one to be mathematically secure whereas other ciphers can be broken given enough cipher text and time
How midi represents music
Musics represented as sequence of instructions
Sixteen channels are supported