Articles Index.

UK2 advert



UK2 advert

Extreme Security - 120x240

UK2 advert

Bits, Bytes and Storage.

All information on a computer is held as bits, the 0's and 1's. 8 of these bits make a byte, the basic binary code used by computers. The simplest way of thinking about the binary code is imagine 8 light bulbs in a row. Now depending on which light bulb is on and which light bulb is off gives you 256 possible combinations, so each 8 bit byte of code represents an individual piece of data. As an example if we were using the ASCII binary code the letter A is represented by 01000022 . For the computer to show this as “A” relies on the programme we use to be able to translate the 01000022 as an ASCII format, with the program itself being controlled by other bytes of information.

You may ask yourself why is 8 used, as you may have also noticed most computer lingo uses numbers based on multiples of 8 such as 32 bit processor, 64 bite processor, 128Kbit , 1024Kbit RAM. So why 8? The short answer is why not. It just happened that working to 8 became the dominant and universally preferred solution adopted by computer scientists.

When working with any media files a basic understanding of storage is required. This is generally not as important if working with text files such as word documents as they tend not to be over greedy on storage space, but media files as music, pictures and video can quickly consume your computers storage and memory resources.

    The general terms of storage units and file sizes are:
  • 1 kilobyte (KB) equals 1,000 bytes.
  • 1 megabyte (MB) is 1,000,000 bytes.
  • 1 gigabyte (GB) is 1,000,000,000 bytes.

As a side note and just in case you are wondering why you are not seeing numbers as 1,024 bytes. The numbers above are based on decimal conversion rather than the binary one.

When working with music or video files there is another aspect that needs to be considered and that is time. You will come across the term Bitrate in media files; that is the amount of data (bytes) to capture per second.

Not to sound too cliché but size is everything. The hard drive in your computer has a certain capacity, typically this might be anything between 80GB to 500GB. And if you are using small portable devices as portable media players your storage size may only be 1GB to 2GB.

The size of files and bitrate has other implications to consider, particularly in the time to copy files to memory cards, and the amount of memory your computer has to devote to handling files.

Having a good grasp of file and storage sizes are very important, especially with media files. The larger the file the more greedy they are and the higher the “potential” quality of the media. I do use the word “potential” as quality and size do not always go hand in hand and there are several factors that influence this.

  • Quality of the original. Without specialized software you cannot improve the quality of the original media. So by devoting a larger bitrate and hence file size can be wasteful.
  • The proposed use of the media. For a video that is to be displayed on a 4 inch screen requires dramatically less quality than if it is to be viewed on a 52 inch screen. Although you may have a high quality video file using 4 gigabytes of storage but if the file is for use on a portable device you would not notice the loss of quality if the file was using 0.5 megabytes of storage.
  • Format of the file used. More on this later.

Formats.

A file format of a music, video or any other data file, is the digital format that the information is written to.

The format that the information or file is saved as has to be the same format that can be used by the program we are using to read the file. These formats can be specific to a program or universal such as JPG (used in imaging programs for pictures) and MP3 for music that can be read by the majority of media players, portable media players and most modern CD / DVD players.

To demonstrate file formats you may want to try the following exercise. Copy some MP3 music files onto a CD then try to play back the CD in as many CD players that you have access to. Your computer, the DVD player on the television, the CD player on your HIFI, the CD player in your car; and note how many devices will play the disc. Hopefully you will have some devices that do not understand what to do with MP3. You can try creating another CD disc but this time rather than copy the files as MP3 create an Audio CD and you will find that all CD devices should play the files back as this is a universal format that all CD devices are programmed to understand. To copy files you can use a program as Windows Explorer (as covered later) and create audio CD's you can use a program as Windows Media Player (review the programs help files or search the internet for how to create Audio CD's as there are many quick guides available on this)

An example of a specific format is PDF (Portable Document Format) that was introduced by Adobe Systems. In the main you will need to have installed on you computer and use Adobe Acrobat Reader (available from www.adobe.com ) to view a PDF document. You can try opening a PDF file with other programs such as Word or OpenOffice to see what happens.

Just to add a further twist to the topic of formats with media files is what is called codex. Although you may have a media player as Windows Media Player, you will encounter some media files that you are unable to play. For all intentions a codex is a bolt on translator that is required to play the specific media format. This is usually the case when newer format versions enter the market and you do not have the required new codex. Usually updates can be obtained from the appropriate website for your media player but also by installing other media software may install usable codex's for your player.

A well respected computer media player that has a good coverage of media formats is VLC Media Player. Visit www.wadiam.com software guide for more details.

You can identify the file format by the extension of the file. Common picture formats will have the file name similar to “mypicturefile.jpg” or “mypicturefile.gif” where the “jpg” and “gif” extensions dictate what format the data is stored in. Do only use this as a rule of thumb as you will come across many instances where this is not always the case and the format can be considered as a further extension. An example you may come across is the extension “.avi” that is used for movies, however this can use a number of different formats.

If you are looking at a folder and cant see the file extensions you will need to change your view options of the folder to show details and in folder options of tools ensure that “Hide extensions for known file types” unchecked. Details covered in Windows Explorer.

To simplify formats and extensions you can consider these as part of the instruction you give your computer or device on what to do with the file. If you click on a MP3 file the computer registers that it is a MP3 file so uses the program that has been associated to this file type to play the file. If you are using a standard Windows computer you will find that it is Windows Media Player that opens and plays the music.

Lossy, lossless and Compressed formats.

Commonly you will come across the phrase if a file format is lossless and if a format is compressed.

A format can either be lossless or lossy. Lossless means the quality is not reduced where in lossy formats the quality is reduced to reduce file sizes.

Compression is either achieved with lossy or lossless formats. Compression is best thought of as the rules and calculations that are used in crating the file. Where lossy or lossless you can think in terms of how blurry you can let a picture become before you notice a loss of quality the compression is how that data is packed into the file. As an example of a possible algorithm (set of instructions) a picture file may be.

  • Pixel 1st row 1st column colour is blue.
  • Pixel 1st row 2nd column colour is blue.
  • And so on to call each 12 million pixels of our image.

A compressed view of this may be :

  • All pixels colour is blue.
  • Pixels Row 1 to 50 Columns 12 to 80 colour is red.

This may be a very unrealistic example but you can see from the algorithm the two important points:

  • The same information can be stored in a smaller format using less disk space and
  • That to read a format the computer or device has to be able to understand the instruction.
Dont forget if you found this of interest and know someone that might also enjoy then please pass it on using the share button at the top of this page. For use in other publications please contact us.