I have 512MB RAM in my PC. Ubuntu detects only 495 MiB. How can I fix this?
On Debian Squeeze, I have 512MB.(The correct size)
OS: Ubuntu 12.04 Precise Pangolin
Your RAM is detected correctly. MB (megabyte) and MiB (mebibyte) are two different units.
If you check the math yourself you will see that 512 MB are 495 MiB ;-)
MB is mostly used for selling stuff because it's the higher number. In your Ubuntu system you will mostly encounter MiB (or GiB).
a) At startup, the BIOS counts the number of working RAM-bytes, but EXCLUDES the ram-bank used for the test. That difference is fully normal. -- b) Any faulty RAM-bank is neither used nor counted. In that case, the computer can still be used for non-important jobs.