I'm pretty certain they require re setting after battery change.
I copied this from
Miata.net:
Instructions
1. Put the key in the ignition and turn it first to the "On" position, then turn it back to "Off." Repeat this two more times, and then remove the key from the ignition. Push the driver side frame button (it's made of black rubber) three times. You must do this within 24 seconds before you can move onto the next step. The doors will make a buzzing sound if you have done this correctly.
2. Push any of the buttons on the remotes that you are programming twice. You will hear the buzzing sound come from the doors once again, meaning that your car is currently synchronizing to the remote. If you are only programming a single remote, repeat this step twice. If you are programming a second remote, repeat this step twice on that one.
3. Press the driver side frame button another time. You should hear two buzzing sounds coming from the doors, which means that the remote programming has been successful.