Memory upgrade help

Hi, I have a compaq presario i can upgrade it to 2 gig it has 2 slots i took the 256 out and bought a kingston 512 , when i put it in the computer was trying to turn on i took it out and put it in the other slot and made sure it was in right and same thing happen it kept on turning on and of . i put the 256 in and everything was fine.what could be wrong. and i know its the right ram.

Sounds like a bad memory module.