DOS and BIOS controlled the entire PC. It resided in RAM memory, along with the various device drivers. DOS and BIOS operate hand-in-hand in controlling the PC. In this discussion, I will try to keep the discussion at the newest or highest version of DOS (MS-DOS 6.22) with which I am familiar.
The Basic Input/Output System (BIOS) is a "chip" on the motherboard that is used during boot time to test the devices attached to the motherboard through the "expansion" slots on the motherboard. It is also the primary tool used by DOS to interact with the devices such as keyboard, hard disks, floppy disks, etc. in your PC.
Now, remember the Operating System of a PC must reside in RAM and chips on your PC's motherboard, or in older PCs, on "daughterboards". Also, there are the "Conventional" memory (the first 640 KB of RAM), High or Upper memory (the next 384 KB) of memory, and extended memory (memory above the first megabyte (1,024,000 bytes). The acronym "KB" means "kilobyte" or 1024 bytes of memory. A byte is 8 binary bits (assuming EBCDIC or Extended ASCII code). A bit is a binary digit, either a"1" or a "0" - a 1 means the bit is ON, a 0 means the bit is off.
DOS and BIOS routines are stored in your RAM memory in the following manner: WRITE ASAP!!!!!