Why must a computer have a BIOS?

Solution 1:

A BIOS is a hardware dependent piece of code stored on the motherboard itself. Every different motherboard needs a custom BIOS written for it, so it would be impossible to have a generic BIOS/OS all-in-one (although the BIOS is technically just stored code, so you could theoretically write an OS for one particular motherboard). As you mentioned, the purpose of the BIOS is to do the following:

When the PC starts up, the first job for the BIOS is the power-on self-test, which initializes and identifies system devices such as the CPU, RAM, video display card, keyboard and mouse, hard disk drive, optical disc drive and other hardware.

Note that you can still start a computer without any external storage - which is why the BIOS is a requirement for a computer. In other terms, the BIOS provides a common software interface to allow a stored computer program to communicate with various hardware devices connected to the motherboard.

For example, if I have two different motherboards with two different SATA controllers, the BIOS allows me to write a piece of code that can work with both, without my knowledge of how the motherboard actually sends commands to the SATA device. I just have to tell the computer "read sector X from this SATA device", and the BIOS is responsible for actually sending those commands to the hardware.

Where it actually gets the "read sector X" information from is a stored program contained within the BIOS, which usually directs the computer to start reading from a bootloader stored in a common location. These common locations are agreed upon by various software and hardware developers, and usually provided to the public to allow for more compatibility between systems.

Once a basic level of interfacing (again, logical interfacing through software) is established, the operating system itself builds a common interface with your various hardware devices (usually by using "device drivers"), and the operating system can then control the hardware.


Finally, it should be noted that the BIOS is also used to make modifications to the computer hardware configurations, and store them in the on-board EEPROM (so your computer remembers the changes next time you start it up). However, as I previously stated, once the operating system is loaded, it has full control of the computer.

This allows for motherboard manufacturers to develop software allowing you to make these changes from within your operating system, as opposed to having to reboot into the BIOS. Again, this is very hardware and software dependent, but goes to show that all computer interfacing is relative. The BIOS is exactly what it's name implies - a basic input/output system, to allow a common software interface for a more advanced program ("operating system") to take control of the machine.

Solution 2:

Your operating system is on your hard disk, if you turn on your computer it won't magically start reading from that hard disk. It is the BIOS that loads the boot loader from the hard disk, as well as do some testing and allowing you to configure certain settings of the BIOS.

Your OS can't do that because it is on the hard disk and not in your ROM.

Hence, you need a BIOS or a similar (but different) technology like EFI...

It is possible to put part of the OS on the ROM (responsible for loading the boot loader of the OS) by the manufacturer; however, this is not widely applicable and there is a BIOS or EFI available anyway.

Solution 3:

No real logical reason. It's more a matter of legacy and history.

  1. There's no requisite that a computer must have a BIOS installed. It's legacy from IBM PC. Although this proved to be a good idea

  2. Having the Operating System doing that wouldn't really change anything because it would still do something like the BIOS does. Of course the OS would need to be in a ROM, not on a I/O device. The problem might arise for monopoly issues when a OS builder decides to make his OS BIOS incompatible with other OSs. Having BIOS manufacturers separate from OSs improves freedom over what software might run.