bit
Short for binary digit.
It is the smallest unit of data that is represented in a computer.
It has a single binary value 1 or 0
nibble
equals to 4 bits (half a byte)
byte
equivalent to 8 bits
1 kibibyte (KiB)
(2^10) equivalent to 1024 bytes
mebibyte (MiB)
2^20 equivalent to 1024 x 1024 (1024^2) bytes
gibibyte (GiB)
2^30 equivalent to 1024 x 1024 x 1024 (1024^3) bytes
1 tebibyte TiB
2^40 equivalent to 1024 x 1024 x 1024 x 1024 bytes
1 pebibyte PiB
equal to 2^50 bytes
exbibyte (EiB)
EiB is equal to 2^60 bytes
acronym for memory size
KMGTPE
King Mark Gave Ten Powerful Elephants”
King = KiB = 2^10 bytes
Mark = MiB = 2^20 bytes
Gave = GiB = 2^30 bytes
Ten = TiB = 2^40 bytes
Powerful = PiB = 2^50 bytes
Elephants = EiB = 2^60 bytes
as u go down divide
The file size of an image is calculated as
image resolution (in pixels) × colour depth (in bits)
The size of a mono sound file is calculated as
sample rate (in Hz) × sample resolution (in bits) × length of sample (in seconds)
For a stereo sound file
you would then multiply the result by two.
Benefits of reducing the size of a file
There are 2 types of compression:
lossy and lossless file compression
Lossy Compression:
-Lossy compression reduces the file size by permanently removing some data from the file e.g reducing image resolution or colour depth, reducing sample rate or sample resolution
mp3- sound, mp4- video, jpeg- image
Lossless
A compression algorithm is used to reduces the file size without permanently removing any data
Run length encoding (RLE)
replaces sequences of repeated characters with a code that represents the character and the number of times it is repeated
How image files are compressed (lossy)
How sound files are compressed (lossy)
How text files are compressed (lossless)
differences
lossless file size will be larger so it may take longer to upload