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.
40Why does a car engine need a starter? Shouldn't the engine be powerful enough to start itself? – Der Hochstapler – 2012-02-29T13:42:13.067
4@OliverSalzburg this will be possible in the near future, gas engines without starters. With direct injection and computers its a snap. – Moab – 2012-02-29T16:44:54.833
2They already have self-starting engines, but they're mostly 12+ cylinder or rotary engines. Most engines can't self-start simply because they can't produce enough power in a single powerstroke to overcome its moment of inertia. Direct injection and better timing might help a little, but really you need lighter engines to increase the ratio between the energy generated in a powerstroke to moment of intertia created by the flywheel, crankshaft, gears, etc. – Lèse majesté – 2012-02-29T22:43:33.207
5Actually, a BIOS in the PC sense is NOT necessary. IBM System/360 and /370 computers (and maybe more recent versions) started up with a single hard-wired instruction that read a single record from a device selected by dials on the console. That record contained a bootstrap program (it had to fit in 80 bytes - one punched card) that loaded a more complex bootstrap program, which loaded the OS from disk. I guess the 'BIOS' was that single instruction hardwired to execute when you pressed the right button (called IPL or initial program load). – Ex Umbris – 2012-03-01T07:25:55.367
2You are confusing "computer" and "PC" in your question. That's why the answers are confusing and sometimes contradictory. – rds – 2012-03-01T11:16:00.413
@ExUmbris Yes, by definition of "IBM PC", BIOS is mandatory for a PC (soon to be surperseeded by UEFI). IBM System/360 is a mainframe and not a PC. – rds – 2012-03-01T11:18:52.437
1@rds the question said "computer" not "PC" – Ex Umbris – 2012-03-01T18:04:51.677
Having BIOS is simpler than having an array of switches and lights where you key in the bootstrap loader every time you start up. (Which is what you used to have to do.) – Daniel R Hicks – 2013-10-08T22:40:39.203