some operating system arent meant to show the entire spectrum of your memory.Some memory maybe hidden for bios images, for hidden files etc.Most of the time you havent formatted your hdd properly which leads to this problem.
If you're talking about a hard drive it's just the difference in the way that the bits are calculated. They way they're marketed, calling it 160 Giga Bytes, they're using Giga as a standard multiplier of 1000, like a 500 Gigawatt power plant etc... However the way your computer actually recognizes these are in multiples of 1024. For anything Gigabyte, take the number that it's marketed as, IE 160 GB, and divide by 1.024^3. You'll get 150 (or 149 really). Just like a 500 GB HDD actually has only 465 usable. It has nothing to do with the system mysteriously occupying some capacity, it's everything about marketing.