Flash drive shows less space than printed capacity?

When we purchase any HDD, memory card or USB flash drive etc. It shows less space than its printed capacity. What is the actual reason behind this? Ex.:- a 500 GB capacity HDD only shows 465.75 GB. Where are other 34.75 GB? If we check flash drive shows less space than printed capacity. Same thing happened with other storage media. I want to know its actual reason. Please reply if you know.
