During this test a check is also made to see if the hardware is functioning correctly. If there is a difference the computer will report an error. The BIOS is a chip that contains software instructions for testing and checking hardware where as the CMOS is a storage for user defined hardware settings.
All computer hardware has to work with software through an interface.
The BIOS is responsible for booting the computer by providing a basic set of instructions. Furthermore, it provides an interface to the underlying hardware for the operating system in the form of a library of interrupt handlers. Some older PC's cannot co-operate with all the modern hardware because their BIOS doesn't support that hardware.