There are many files formats used to store data, be this text, images or sound, in computer systems.

File formats come in many forms, such as:

  • Musical instrument digital interface(MIDI)
  • MP3
  • MP4
  • jpeg
  • text and number format

MIDI is associated with the storage of music files. However, MIDI files are not music and don’t contain any sounds, and, is very different to mp3 files. MIDI is a communications protocol that allows electronic sounds to interact with each other. It is lower quality than mp3(90% less).

Image result for midi files

Method of use:

The protocol uses:

  • 8-bit serial transmission (one bit at a time, over a single wire/channel)
  • Which is therefore asynchronous(not occurring at the same time).
  • MIDI contains 16 channels from 0-15.

Pitch byte:

Used to work out what key/note/string has been pressed/strung.

Velocity byte:

Identifies pressure/how loud a keynote/string should be played.

 

MPEG-3 (MP3) and MPEG(MP4):

MP3 uses technology known as AUDIO COMPRESSION to convert music and other sounds into an MP3 file format. Using a compression technology, it reduces a size of a normal music file by 90%. For example:

If there a is 80 megabyte file, it can be reduced to 8 megabytes using MP3 technology.

However, quality of the sound by the human hear can’t detect much difference because of the method of PERCEPTUAL MUSIC SHAPING, which essentially removes sounds that the human ear can’t hear properly. MP3 files uses what is known as lossy format.

By using Lossless file compression the bits in the original file can be reconstructed when uncompressed. This prevents any data being lost for example, a spreadsheet.

Image result for mp3

However lossy file compression is completely opposite, the original file cannot be reconstructed because it removes all the unnecessary bits of data found in MP3 and jpeg formats.

For sharing document and generic computer files you would you lossless file compression because there isn’t any necessary data or quality that needs to be removed from the file in comparison to MP3. Data will also need to be recovered because the loss of data on a document is large compared to losing bits of data in an MP3 file.

When a photographic file undergoes file compression, the size of the file is reduced likewise for MP3 format. One example of a file format to reduce photographic files are JPEG, which uses lossy file compression. Once the photographic file undergoes file compression, the original file can no longer be constructed.

To add to that, text files can also undergo file compression. By simply using algorithms that reduce the amount of words in a database due to repetition. For example:

The phrase “THIS SENTENCE SHOWS YOU HOW THIS WORKS“.

By just looking at it we know that it consists of 38 memory units if we are including spaces. We can already reduce the amount of characters by using a data dictionary. Repeated words such as “THIS” would be replaced by “1”. “HOW” and “OU” can be replaced by “2” and “3”. So the reduced file would now look like this:

1 SENTENCE S2S Y3 2 1 WORKS” – This phrase has been reduced to only 27 units now.

This method of file reduction is an example of lossless file compression, since the original phrase can be reformed if necessary by using the data dictionary.

Primary memory

RANDOM ACCESS MEMORY (RAM)

Generally, the larger the size of RAM the faster the computer will operate. RAM is much faster to write to or read from than other types of memory, however its drawback is its volatility.

  • It is volatile/temporary memory(all contents of data on the RAM is lost when power is turned OFF).
  • it is used to store data, files or parts of the OS that are currently in use.
  • It can be written or read from and the contents of the memory can be changed

Image result for ram

DYNAMIC RAM (DRAM)

Each DRAM chip consists of a number of transistors and capacitors. Each of which function as the following:

  • Capacitor – holds bits of information (0, 1)
  • Transistor – acts as a switch; allow chip control circuitry to read capacitor or change the capacitor’s value.

The DRAM needs to be constantly refreshed. If it isn’t being refreshed, the capacitor will keep losing its value leaving every capacitor with the value 0.

DRAMs have a number of advantages over SRAMs:

  • Less expensive
  • Consume less power
  • Higher storage capacity

Image result for dynamic ram

STATIC RAM (SRAM)

SRAMs don’t need to be constantly, as it is much faster than the DRAM when it comes to data access. Even though DRAM is the most common use of memory storage, SRAM is preferred when it comes to speed.

Image result for static ram

READ ONLY MEMORY (ROM) 

The main features of the ROM include:

  • They are permanent memories (non-volatile), meaning that when power is switch off to the ROM the contents aren’t removed.
  • Data/contents of the ROM can only be read, not changed
  • Often used to store instruction when the computer is first switched on

Image result for rom

Secondary storage

Secondary storage include devices such as HDD and SSD.

Secondary storage required as RAM loses data once powered off. CPU can only access data stored in RAM, needs to be re-writable so CPU can access data once transferred from secondary storage

  • There are three types of secondary storage:
    Magnetic:
  • Can read, write and erase data using electromagnets and magnetic fields to control tiny magnetic dots of data. Dots represent binary
  • Tape based magnetic storage use cartridge of looped magnetic tape.
  • Disk based made up for several platters (disks). Made from metal or glass. Dots lie around track in each platter. Has a rotating spindle that writes/read dots to/from. Hard Disk is the most common type of magnetic storage.
    Optical:
  • Data is read by shining laser beam onto surface of disk. Laser creates indentation (Pits) when writing data.
  • Have a better transfer speed than magnetic storage. Commonly range from 10 and 72 MB per second Blu ray, CD and DVD’s are a common type of optical storage.
    Solid state:
  • SD card, SSD, USB/Flash Drive
  • Small in size, faster data transfer rate in comparison to optical and magnetic (230MB per second)
  • Useful as portable storage as small in size
  • Used in tablets, smartphones due to size

HDD (Hard disk drives)

Hard disk drives are the most common type of secondary storage, and web servers mainly use this type of storage because of its higher storage capacity. Because of its relatively cheap cost, they are mainly used over SSD. Data is stored as digital data on the magnetic surface of the disk. A number of platters on the magnetic surface of the disk spin around 7000 times per second. They are much slower than SSD, as they consist of moving parts.

Image result for hdd

 

 

SSD (Solid state drive)

SSD are considerably better because they don’t consist of any moving parts, therefore they are faster. SSD uses chips instead of disks, the most common one being the NAND chips. They store data by controlling the movement of electrons within the NAND chips. The chips produce non-volatile re-writable memory.

Some devices use EEPROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ ONLY MEMORY) which is virtually the same processes of storing data but instead uses NOR chips. This technology is essentially faster, as it allows data to be read or erased in a single byte at a time. NAND chips only allow read or erase in blocks of data. Because of this, they are much more expensive than NAND technology.

The main benefits of SSD over HDD:

  • More reliable (no moving parts)
  • Considerably lighter (suitable for laptops)
  • Run much cooler
  • Lower power consumption
  • Data access is faster

Drawback:

Longevity and lower storage capacity than HDD

Image result for SSD

Offline storage

Non volatile storage, disconnected from the web, not connected to any device that has an internet connection
Examples of offline storage are DVD, CD, USB flash memory, removable HDD
Air gapped computers used to access offline storage if security a concern.

CD/DVD’s

Optical storage that uses a red laser light to read and write data on the surface of the disk. The data is stored in ‘pits’ and ‘bumps’ on the spiral track. CDs and DVDs can be differentiated by R (write once only) and RW (can be written to or read from many times). DVD’s uses DUAL-LAYERING technology which increases storage capacity.

Image result for cd dvd

Blu-ray disk

Another example of an optical storage device, however it uses blue laser rather than red laser to read and write data. The wavelength of the blue light is only 405 nano-meters, compared to 650 nm for the red light. Blu-ray disks allow much storage because of this, such as movies, games, etc.

Image result for blu ray disc

DVD-RAM

Instead of using a single, spiral track, they use a number of concentric tracks, which allows simultaneous read/write operations to take place (up to 100000 times). They have great longevity (30 years).

Image result for dvd ram

USB/FLASH memory

These are examples of solid state technology. Each memory card is made up of NAND gates. USB’s are lightweight devices, which are essential and convenient when transferring files between computers. They are usually used to store movies, videos, photos, and therefore they do not have a large storage capacity. If ejected from a device such as a computer, the files may be in danger of being corrupted.

Image result for usb

Here are some calculations to recap earlier about image sizes:

Number of pixels : horizontal pixels * vertical pixels
Size of the image files: number of pixels * 3 (colours -Red, Green, Blue)
File size when reduced: image size / reduction factor
Size of the image file from bytes to kilobytes: image size in bytes / 1024
Size of the image file from kilobytes to bytes: image size in kilobytes * 1024
Number of files in a storage device: storage device capacity / file size

Image result for bits kb mb gb