In your computer the battery powers a chip called the Real time clock chip
the RTC is essentially a quartz watch that runs all the time whether or not the computer has power
the battery powers this clock when the computer boots up part of the process is to query the RTC to get the correct time and date
a little query clock like this might run five to seven years off a small battery
then it is time to replace the battery
the BIOS stores all sorts of information in the CMOS RAM area
่