1.1.1 DataStorage

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

1.1.

3Data Storage
Introductions:-
There are many formats in which data is stored such as images, sound, videos and even text. This section will explore the different
types of data as well as the different techniques used for file compression. Students will also here about primary memory and secondary memory
as well as the main technologies used in (magnetic, optical and solid state).
File Formats:-
We will look at MIDI, MP-3, MP-4, jpeg, text and number format.
MIDI:-
Musical Instrument Digital Interface is involved with the storage of music files. MIDI files are not music files and do not contain any
sound, they are different from MP3 and MP4 files. MIDI files basically contain a list of commands that instruct a device on how to create a
particular sound. MIDI operates on 16 different channels (0 to 15) and contains instructions that indicate what key is to played and how hard it
is to be played. It also contains additional bytes that include PITCH BYTE on what note to play and VELOCITY BYTE to tell how loud to play
a certain note. If this “.mid” file is played back using a musical instrument then it will play according to the original version. Due to its 16
channels the MIDI files can support up to 16 different instruments. Due to a complete lack of audio in MIDI files it is 10 times smaller than a
normal MP3 file.
MPEG-3 and MPEG-4
MPEG-3 (MP3) uses technology known as AUDIO COMPRESSION to convert music and other sounds into an MP3 file format.
Essentially, this compression technology will reduce the size of a normal music file by about 90 per cent. For example, an 80 megabyte music
CD can be reduced to 8 megabytes using MP3 technology. MP3 files are used in MP3 players, computers or mobile phones. Files can be
downloaded from the internet, or CDs can be converted to MP3 format using FILE COMPRESSION software. The converted version does not
match the full version of a CD but still is usable for most general purposes. With the help of PERCEPTUAL MUSIC SHAPING sounds that
the human ear cannot hear properly are removed hence reducing the size of the file without affecting the quality too much. The quality of MP3
files can be different since it depends on the BIT RATE – this is the number of bits per second used when creating the file. Bit rates are roughly
between 80 and 320 kilobits per second; usually 200 or higher gives a sound quality close to a normal CD. MPEG-4 (MP4) files allows the
storage and transfer of multimedia files rather than just sound i.e. music, videos, photos and animation over some medium such as the internet
without losing any real noticeable quality.
Joint Photographic Experts Group (jpeg) files:-
The resolution of the photographs is reduced from First to Last. The first two are somewhat
sharp but the last one is almost unrecognisable. This is the result of changing the number of
PIXELS per centimetre used to store the image (that is, reducing the PICTURE
RESOLUTION).

When a photographic file undergoes file compression, the size of the file is reduced. The trade-off for this reduced file size is reduced
quality of the image. One of the file formats used to reduce photographic file sizes is known as JPEG. As with MP3 format, once the image is
subjected to the jpeg compression algorithm, a new file is formed and the original file can no longer be constructed this is also known as Lossy
compression. Jpeg will reduce the RAW BITMAP, which can be of TIFF (.TIF) or BITMAP (.BMP) image, by a factor of between 5 and 15
depending on the quality of the original.
For Example:-
An Image is 2048 pixels wide and 1536 pixels high with a total of (2048 * 1536) = 3,145,728 in other words more than 3 megapixel image. Since there are
three main colours (RED, GREEN and BLUE) each colour takes up one byte therefore a 3 megapixel image will take up 9 megabytes (3 megapixels * 3). If the
same image stored in jpeg will take up .6 to 1.8 megabytes.
Text and Number Formats:-
Text and numbers can be stored in a number of formats. Text is usually stored in an ASCII format. It is important that the correct
format is chosen if some form of processing is to be done. If number files undergo any form of file compression, then it tends to be lossless.
Since it very important that none of the information/data is lost. If ASCII format is used to store text on a file, then the word COMPUTER
would be stored as either:
67 79 77 80 85 84 69 82 or %43 %4F %4D %50 %55 %54 %45 %52
(the first code is in denary and the second in hexadecimal)
Text files can also undergo file compression. These use complex algorithms that work on redundancy or repeated sections of words.
The following section shows, in very simple terms, how this could work: The phrase „THIS SECTION SHOWS YOU HOW THIS WOULD
WORK‟ consists of 35 memory units (ignoring spaces). Repeated words, such as „THIS‟ could be put into a data dictionary and be replaced by
„1‟. Repeated word sections, such as „HOW‟ and „OU‟ could be replaced by the numbers „2‟ and „3‟. Our phrase then becomes „1 SECTION
S2S Y3 2 1 W3LD WORK‟.
1.1.3Data Storage
Again, ignoring spaces, this compressed form now uses only 23 memory units. This is about a 33% saving in file size. Obviously if
whole pages are to be stored, then repeated words and word sections become even more numerous. This is clearly an example of lossless
compression since the original phrase can be reformed if necessary using the data dictionary and compressed file.
Lossless File Compression:-
With LOSSLESS FILE COMPRESSION, all the data bits from the original file are reconstructed when the file is again uncompressed. This is
particularly important for files where loss of any data would be disastrous – for example, a spreadsheet file.
Lossy file compression:-
LOSSY FILE COMPRESSION is very different to lossless file compression. With this technique, the file compression algorithm eliminates
unnecessary bits of data as seen in MP3 and jpeg formats. It is impossible to get the original file back once it is compressed. This is why it is
chosen for files where removing certain bits doesn‟t detract from the quality.

You might also like