What do you mean 'mostly'. iF THE manafacturer specified that its 512mb then you have a incompatability issue with ur mobo. RAM rarely displays the wrong amount on screen. Maybe by a few meg but not like in your case.
Post some more info. and ill do what i can to help.