


At any given time the hard disk is always full of values (bits).
Even a new hard disk is full of data which we know as garbage values.
A C programmer (I am one!!!) can actually interpret this practically on a smaller scale by writing the following program:
void main()
{
int a;
printf(“%d”,a);
}
The above code creates a variable ‘a’ and allocates space to it in the main memory. The variable is not assigned any value, but the output shown is some irrelevant CRAP!!!
This CRAP is actually the garbage value stored at that location.
Moreover the variable is assigned a particular address which can be called using ‘&a’. This address is the actual location of variable a.
Now we apply this concept to our File System & Hard Disk. The new hard disk consists of various sectors each with lots of cells containing garbage values. When we copy a file to the hard disk, these garbage bit patterns of the cells are altered and a new sequence is formed according to the file contents. A start bit and end bit for each file is also stored. The start bit points to the file. So you can easily reach the file when u search for it!!!
The start bit is analogous to the address of variable as explained above. When more files are copied, they are mostly appended, till the time when all garbage bit sequences are modified. At any time, the total amount of garbage values is the total free space on the HDD.
Now, when a file is copied, its start and end bits are stored in the registry. There is an entry in the registry for each and every file.
When a file is erased, only the start and end bits of the file are removed while the bit patterns remain. Thus the space occupied by the file is considered garbage and added to the total free space. These bit patterns can be modified if more files are copied. But the file can be easily recovered as the registry entry is not removed.