Saturday, February 28, 2009

File Management

Bits and Bytes
To hold information, a medium such as a hard disk uses a system that resembles a combination of small boxes. Let's illustrate it as follows:
This box can hold only a small piece of information. It can only be either 0 or 1. When the box is empty, it holds a value of 0. When it is full, it holds a value of

1:
0 1
You can represent a piece of information with one of two states. This box used to represent a value is called a binary digit; in its abbreviated form, it is called a bit (for binary digit).
This produces the following binary combinations: 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111 = 16 combinations. When using the decimal system, these combinations can be represented as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15.
This combination is also a system that the computer uses to count bits internally. This technique is valuable and allows you to always identify a number as a divider of 4.
When all bits of a group of 4 are 0, the combination has the lowest value, which is 0000. Any of the other combinations has at least one 0 bit, except for the last one. When all bits are 1, this provides the highest value possible for a group of 4 bits. The lowest value, also considered the minimum value, can be represented as 0. The highest value, also considered the maximum, can be expressed in decimal value as 24 (2 represents the fact that there are two possible states: 0 and 1; 4 represents the fact that there are four possible combinations), which is 16. This produces 16 because 24 = 16.
A combination of 8 consecutive bits is called a byte. The bits are counted from right to left starting at 0:

You can represent a byte using a combination of 0s and 1s. If you have the patience to create combinations of bits using the boxes as we did for the group of 4, you would find out that there are 256 possible combinations. Another way to find it out is by using the base 2 technique:
27 + 26 + 25 + 24 + 23 + 22 + 21 + 20= 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1= 255
Therefore, the maximum decimal value you can store in a byte is 255. Remember that the byte with all bits having a value of 0 has its value set to 0. Since this byte also holds a valid value, the number of combinations = 255 + 1 = 256.
The only type of information you can store in a byte is a character or symbol, such as a readable letter from the alphabet: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, and Z. Besides these readable characters, a byte can also hold one digit: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. A byte can also hold a readable or non-readable symbols such as ` ~ ! @ # $ % ^ & * ( ) - _ = + [ { ] } \ ; : ' < ? . / , > "
This means that a combination of 8 bits, called a byte, is enough to represent one symbol recognized in the English language. In this globalization word, a computer also needs to be able to store characters from other Latin-based languages such as letters from Français or Español. To make this possible, instead of 8 bits, the operating system must use 16 bits. A combination of 16 consecutive bits is also called a word.
A group of 1000 bytes is supposed to be called a kilobyte but, based on the way the computer calculates the bits, a group of 1024 bytes is called a kilobyte or KB. A group of 1,000,000 bytes is called a megabyte but actually it is a group of 1,024,000 bytes that is called a megabyte or MB. A group of 1,000,000,000 bytes or actually a group of 1,073,741,824 bytes is called a gigabyte or GB.

No comments:

Post a Comment