What Exactly is BIOS? Please Explain.

oathmark1

Commendable
May 15, 2016
208
0
1,680
I've done some tinkering with it before, but I never really understood it.

When I was taking on the BIOS, I was also doing something with the pins on the mobo, and moving some kind of connector between the to one position and then back. I believe this was during a BIOS reset.

What is the story behind these two things?
 
Solution


Sounds to me like you're confusing BIOS and CMOS.

As others have indicated, BIOS is an antiquated and simplified method for effecting communications between the devices and peripherals attached to a computer during the boot process before the OS can take over. It is antiquated because it has been replaced, in modern computers, with UEFI.

The CMOS is the term used to refer to a non-volatile storage of the...
So, a BIOS stands for: Basic Input Output System; I assume in asking this question you want a more involved explanation as to what it is. So, here you have it:

Why do you have one? What does it do?

Two main things: it stores extremely basic hardware settings and allows them to be modified, as they might need to be before they could otherwise be usefully booted (ie: enabling a Sata port. If you couldn't do it on an outside system, you couldn't boot onto or use that drive! Putting your horse before the cart, really.) and outside of its basic interface, it handles the stuff described below, passing off control to the more sophisticated operating system by initializing and preparing the hardware to do so.

So, this is based on the early days of computers. Everything had to be written by one's and zeros, which naturally was rather difficult. However, much like Baron von Munchausen, people realized that by making basic systems in lower level (closer to the 1-0 coding computers natively understand) they could then build on that platform to enable more and more complex things, sort of like using a scaffold to make a tall building.

This is the reason starting your computer up is called "booting" after Munchausen's claims about lifting oneself up by the bootstraps. Each successive step in the boot cycle is a more capable, though simpler to code, series of compiled code that is built based on the foundation of smaller segments of more complex code.

Think of it sort of like a pyramid. First you do a little bit of extremely hard machine language code. This lets you write in n-1 difficulty code so you can do a bit more, and so on and so forth, until you arrive at a point you can just:

IF .... Then.... which is something we understand.

Slight tangent. Anyhow, this is the same concept behind BIOS. Hardware is exceedingly complicated. Windows is multiple gigabytes of code. If you looked at a BIOS file you download from your manufacturer, you would find it's mere megabytes of code at most. It is harder to program, but ultimately far far less code which handles passing off to the operating system by intializing your hardware. BIOS works on your motherboard from its own chip and with its own basic logic processor (very, very basic, like a calculator) so that it can handle preparing all of your hardware, such as getting things pulled off the disk and into memory, telling your processor where to start executing, etc.

In essence, BIOS exists as a basic system to initialize hardware and to build upon as more and more capable code is called up by loading these components in series. Because it can do this, it keeps code manageable.

To use MIPS (machine language code for processors by Imagination Technologies) as an example (this is just one level removed from coding in pure 1s and 0s) for this loop:

Psuedocode for calculating Fibonacci Nums:
C++:
    int fibonacci(nth_num) {
          int fib = 1
          int last_fib = 0
          int i = 0
          for i =0, i < nth_num, i++ {
               fib = fib + last_fib
               last_fib = fib
           return fib

Something like that. Probably not exact.

In MIPS, a similar language to what a BIOS would be written in:
C++:
main:
    li $1, 0x01
    li $2, 0x00
    add $3, $0, $a0
    addi $3, $3, -1
    li $4, 0x00
    fib_loop:
          add $1, $1, $2
          add $2, $0, $1
          addi $4, $1, 1
          bne $4, $3, fib_loop
    add $v1, $0, $1
    li $v0, 0x0a
    syscall

And keep in mind that each part of that would have to be translated to its 1s and 0s initially, since technically even this level of sophistication in a language needs a compiler. Now, imagine doing this with hardware level stuff? Drawing out graphics and whatnot?

This is why BIOS is so useful, since it lets you escalate to higher and higher level code based on a minimal amount of harder code at the start, keeping it all very manageable.

Now, as to why you had to do the pin thing (jumping) the pins?

BIOS is a pretty important part of your computer. If it's overwritten or destroyed (as many earlier malware would try to do when it was less protected and harder to reset) your computer cannot start as it would be like trying to build scaffolding without having the first 6 feet touching the ground. It's not possible.

What those jumpers do, since BIOS is, well, basic, is offer an input method to reset the backup of the BIOS stored on the chips. Most motherboards have a working copy and then one that they keep in reserve - when you activate this jumper, it tells the motherboard to reset the working bios with its good copy. As obviously, if you've corrupted the only thing that lets you boot, more convenient input like keyboards and mice can't work due to that low complexity of the system.

This is sort of like how if you bork your Windows install, you can go to another computer and download the software you need there, to bring back to your broken system, since the system you'd use it on is not capable of getting it itself in its broken state.

Your board detects the deliberate electrical shorts caused by joining these pins (jumping them) and interprets that as you wanting it to do a very basic action, such as restore itself from a good copy, since the more convenient methods of doing this are precluded by the fact they would require it to be in a working state.

Similarly, if you break your settings in the BIOS, these can preclude it from working properly enough to let you use your keyboard and mouse to fix things. So a different set of pins gets shorted, and this tells your BIOS to restore to its default working values, which then let it boot and you can do what you otherwise would like to.
 

Karadjgne

Titan
Ambassador
In English, (not techno), the bios is the engine that sorts/starts/drives all your pc hardware. Cmos is the list that bios uses, so it holds all the info that the bios uses. When you pull the battery or jumper the cmos, it clears that memory and forces the bios to take the extra time to hunt down all the info individually from each hardware component and gets organized within a default factory setting. The pins I believe you are referring to is the jumper pins for resetting the cmos, your mobo manual will show you what/where or if you need a jumper. It's usually on pins 1-2, reset will be a temporary move to 2-3,then returned to 1-2.
 

oathmark1

Commendable
May 15, 2016
208
0
1,680



Thanks. Only a hammerhead can type all of that off hand, and only another hammerhead would recognize that.....like myself. "Hammers away."
 


Sounds to me like you're confusing BIOS and CMOS.

As others have indicated, BIOS is an antiquated and simplified method for effecting communications between the devices and peripherals attached to a computer during the boot process before the OS can take over. It is antiquated because it has been replaced, in modern computers, with UEFI.

The CMOS is the term used to refer to a non-volatile storage of the settings needed to facilitate said communications. Whenever you update your UEFI or, if your machine is sufficiently ancient, BIOS you generally need to clear the CMOS storage of settings because they may conflict with operation of the new UEFI. That's what I think you are doing when you were doing something (I hope PG rated) with those pins and that connector which is probably a jumper.
 
Solution

oathmark1

Commendable
May 15, 2016
208
0
1,680
Drea-
That's what I think you are doing when you were doing something (I hope PG rated) with those pins and that connector which is probably a jumper.

Yes, that was what it was I was doing. I remember now.