Bit (Binary digIT) - the digital "alphabet"
The alphabet of a digital (computer) system is 1s and 0s (Bits), represented by electrical signals and switches that turn on and off. Click here for more on the physical forms that digital signals can take.
Bytes - "digital words"
Like letters of the alphabet which can be grouped together to form words, so digital Bits may be grouped together to form digital "words" known as Bytes. Bytes can have different numbers of bits in them. The number of bits in a byte is expressed as its bit-depth or "word length".
Byte (examples) | Bit depth (word length) | Possible range of values | Example file types |
---|---|---|---|
1001 | 4-bit | 16 | .gif |
10011100 | 8-bit | 256 | .gif, MIDI. 8-bit bytes are also used to express storage capacity and file size. |
1001110000110101 | 16-bit | 65,536 | CD audio |
100101101001000100011110 | 24-bit | Millions | Photoshop, DVD audio |
Digital files
These Bytes can be grouped together to form complex digital files in which instructions and information is contained. There are many many types of digital file such as ...
- System files for your Windows or Mac OS
- Programs
- Image files
- Music files
- Document files
- etc etc
Differing word lengths
As a general rule, the bytes in an individual software element (eg an image file, application or system component) will have identical bit-depths. There are some exceptions such as the MP3 format which offers a variable word length option, but this is not the norm.
However, word length may differ between software elements in a single computer system. For example, a system may be dealing with all the following file types simultaneously ...
- A GIF image file which will comprise a number of 8-bit (or less) bytes
- A CD quality .aif or .wav audio file which will comprise a number of 16-bit bytes
- A native RGB Photoshop document which will comprise a number of 24-bit bytes
- Elements of an operating system some of which may be 32-bit whilst others are 64-bit
It is possible for a single application to handle different media files of different bit depths simultaneously. For example ... Flash can replay audio, display images and play video files each with a different word length.
Calculating digital file size and hardware capacity
It is often useful to know not only how big these files are, but the capacity of the storage devices they are stored on, and how quickly they can be transferred to another system. For example you may need to know ...
- How much space they will take up on a hard drive or CDROM disc
- How many files and programs you can load from a storage device into the RAM memory of the computer at the same time
- How long it will take them to be sent over the internet
- etc etc
Units of storage and memory
Standard units of quantity (or size) are employed to express to describe ...
- Size of computer files (system elements, applications, and data)
- Capacity of short term memory modules (RAM, FlashRAM and ROM)
- Capacity of long term storage devices such as hard drives and CD-ROM discs.
The following is an overview of these units, in order from smallest to largest ...
Unit | Description | Size |
---|---|---|
Bit (Binary digIT) | The digital "alphabet" The basic and smallest unit. The Bit is the alphabet of a digital signal. A single Bit can be either a 1 (on) or a 0 (off). (click here for the different physical forms a bit can take). |
- |
Byte | The digital "word" Early computers grouped Bits into units of 8 to form computer "words" or Bytes . For example: 10011101An 8-bit Byte can represent 256 values between 0 (00000000) and 255 (11111111). Bit depth Bit depth expresses the number of Bits in a Byte. So a Byte made up from 8 Bits is said to have a Bit depth of 8. We might also say it is an 8-bit Byte. As computer power improved, 16, 24, 32, 64 etc Bytes became possible by combining 8-bit Bytes together. As a general rule, the more bits in a byte, the more powerful and sophisticated the language can be. |
Variable but ... ... always 8 bits when used to measure file size, storage and memory (RAM) capacity. IMPORTANT NOTE: No mater what bit-depth the Bytes in a file actually are, the total file size is always expressed in terms of 8-bit bytes. So the size of a file that contains two 16-bit Bytes (32 Bits in total) will be said to be 4 bytes in size (4 x 8 = 32). |
Kilobit (kb) | Used to express network bandwidth. eg Because 1 byte is 8 bits, a 56K (56 Kilobits/sec) modem connection has a bandwidth of 7 KiloBytes/sec (56 divided by 8). |
1024 Bits |
KiloByte (KB, Kb) | Currently used to measure ...
Particularly important in web site development where small file size (html pages and image files) is paramount. |
1024 Bytes |
MegaByte (Mb) | Currently used to measure ...
|
1024 KiloBytes |
GigaByte (Gb) | Currently used to express ...
|
1024 MegaBytes |
TeraByte (Tb) | Used to express the capacity of large hard drives. Soon (2008) the internal drives of "consumer" PCs will have capacities measured in Tb's. | 1024 GigaBytes |
How operating systems measure file size and storage capacity
It is useful to know that irrespective of the actual bit-depth of the bytes in a given file, operating systems always report file size and storage capacity in 8-bit bytes.
eg A file that contains 100 x 16-bit bytes would be reported by the operating system as being 200 (8-bit) bytes in size.