As far as I know, if the BIOS has a password set, you can reset it by removing the battery and inserting it again.

Why is this so? Do all the CMOS settings reset to default after such a manipulation with the battery? What exactly happens to all the settings when reinserting the battery?


Well, this is the wrong site to ask this (it's not programming related), but here goes: the battery is primarily needed to drive the RTC (real time clock) which needs to keep running even if the computer is powered off.

The BIOS often has a dedicated RAM which stores the settings, and the battery is needed to preserve this RAM as well. Information in RAM is not stable and "decays" and thus need to be read and stored again to keep the information. This called a memory refresh. You obviously need power for that, thus the battery. So if you remove the battery and the power is off, the RAM can't be refreshed and the information in it is lost.

However, AFAIK most modern BIOS chips have NVRAM (non-volatile RAM) which is able to keep the settings even without a battery. I remember that on one mainboard I had there was a jumper that you had to close to actually make the BIOS clear the NVRAM (and thus go back to factory default settings), since there was no battery.

I've also seen mainboards that use special capacitors instead of batteries.

| improve this answer | |
  • Yeah, but what happens next? Default settings will be loaded into it when I will turn power on? – Haroogan Jun 8 '11 at 12:59
  • 2
    You normally write code so that "setting not set" means to use a default value. A BIOS wouldn't be different. – DarkDust Jun 8 '11 at 13:00

Some of the data in CMOS will be check-summed, so that when it is first powered on, the BIOS will "know" that the data in CMOS is not correct. It will then write whatever default values it wants into CMOS.

BTW, any modern BIOS should not have a password that depends on CMOS. That is simply too easily bypassed. Current PCs should have the password stored in some non-volatile memory, preferably memory that isn't connected to the CPU at all, but is accessed via commands from the CPU to some other embedded controller.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.