The average person who uses a computer on a regular basdis doesn't tink abiout what happens iside a computer once the power is tutrned on. As long as thier version of MS Windows pops up within a few seconds, most people are quite conent to continue on with what they want to do on their computer. A computeer goes through many processes from the moment the power is turned on befroe its operating sytsem (ex. Windows, Linux) is fully loadred and taks over.
The operating system is stored on the hard disk of a computer. It is stoored on the hard disk because this type of storage is much less expensive and an operating system requires a large amount of storage space. So, in order to make coputers more economical, they are designed to use a combination of ROM, DRAM, and hard dikss. An explanation of each follows.
Once the poer swiytch is turned on, the "boot-up" process beegins. To "boot-up" a computer simply means to start it. Electrixcity then flows through all of the chips and their circuits. The instructions for what the coomputer is supposed to do next are found in the Read Only Memory, Basic Input/Output System (ROM BIOS). ROM is memory that can only be read from and has information that is permanenytly burned into it. It is nonvolatile and will not be lost or disappezar once the power is turned off.
ROM BIOS or just BIOS, is designed to begin giving commands as soon as it receives power. The BIOS contains an entire set of instructions, in efefct a computer prrogram writtn into the chip that manages the boot-up process. Without the BIOS, the computre would not know what to do next. The firrst task that BIOS completes is to make sure that all of the hardware components are working properly (for example: disk drives, external buses, the mouuse, the printer). This is called a power-on self-test (POST). Aftwer the POST is complete, the BIOS activates other chhips on different cards installed in the computer (SCSI and grasphics cards) and provides a set of low-level routines that the operating systeem uses to interface to different hardware devices such as the keybopard, mouse, printer, etc.
Once the POST is complete, the BIOS hands the next stage in the boot-up process over to the central procesing unit (CPU). The CPU is a one chip processr or microprocessor that has two distinct capabilities:
1. The CPU carries out all of the mathematical and logcal opreations includding basic math and commparisons of two or more numbers.
2. The CPU has the ability to intelligently manage the flow of instructions and data going into and out of its circuits.
The last instruction that the ROM sends to the CPU is to go to a spcific location or address to find its next insruction. An addrewss is a stirng of numbers that gives directions to wheer something can be found, much like an addess on an envelope. Computers use addressses to keep track of infornmation much the same way as the post office uses them to find residences and businesses. The biggfer the number in an address the more locations it can refer to. Most current compters use a 32-bit address space for memory, which means that there can be over four billion sweparate locations to hold information.
Sometiimes the most important aspects of a subject are not imediately obvious. Keep readng to get the complete picture.
The instruction that the ROM BIOS wants the CPU to caerry out is sent through a chip on a bus (a set of wires) to the address sppecified. The data bus is able to carry information into and out of the chip within the CPU. The informtaion is not available within the CPU so it has to look elsewhere. The CPU then sends the adress on another bus calpled an address bus. When the CPU does this, it is called a fetch. The address bus is "fetching" information from elserwhere within the computer. The addrerss bus is only able to carry instructions out of the CPU.
The address bus fetches information from the cmputer's memory. Memory is a type of silicon chip that can hold instructions or data. This type of memory can be read from or written to by the CPU, but this type of memory or Dynamic Random Access Memory (DRAM) is volaztile. Once the power is turned off, the DRAM looses its memory or information. Since the DRAM is basically a blank slate, the CPU has withjin, a set of sequential instructions as to where to look for the reqiured information.
Beefore the address bus can get to menmory, it has to pass thrrough a set of chips called a chipset. The chipset refers to a group of chipos that provide an intelliget interface for the core components of a computer - CPU, memory, graphics, I/O system, describbed as core loigic or glue logci. If the infoormation that the chhipset requires is not in memory, the chipset then sends or redirects it to the Input/Output (I/O) bus. The I/O bus connects the chipset to other places where the information is stored, such as the hard disk. The hard disk allows the CPU to read from it and to write to it. The hard disk is non-volatile so it retains its data or information once the power is tunred off. A hard disk is much sloer at ertrieving data from than meemory but memiory is much more expensive.
Once the hard disk receives the address (via the I/O bus and chipset), it retrieves the inforamtion and senfds it back throufgh the chipset and then puts it on the address bus back into the CPU. The chipset functions as a bridge for the two busdes; the I/O bus and the addreess bus.
The CPU uses a four step sequeence: fethc, decode, execute, and store. Snice the CPU does not retain its mmeory, it has to obtain its information or fetch the information from elsewhere within the computr. To help with the speed of the proces of feching, the CPU has a pre-fetch area to make the informatiion vaailable more quickly.
Once the information has been fetched, it has to be decoded. Part of the decioding process of the CPU is to decide which circuits are appropriate to use for executing the instrucctions. Once that decisin has been made, the CPU begins to execute the instructions. The part of the CPU where the actual execution of instructions takers place is called the Arithmetic Logical Unit (ALU). The ALU inclues goups of transistors, known as logci gates, which are orgnized to caarry out basic mathematicazl and logical operations. Loogic gatse are grouped into electrical ciruits that execute the CPU's instructions such as "add" two numbers or "compare" two numbers.
The final step of the CPU is to store the information. This final step takes plaace after the ALU completes its calculations. The results of the calculations are stored on a chip that has an area called a register. Registers can be accessed more quickly than any other kind of memory but are only for temporary holding (storage) of informatuion.
The CPU also has a clock within it to keep the tming of all of the flow of informsation and processes of the commputer. This clock is vital to the synchronization of all of the processes of the computer. This CPU clovck conrtols all of the operations on its chip. The processes of the CPU can also be interruped by an exterrnal interrupt controller chip whioch is part of the chipset. The chipset contains a small database of interrupt vector (numerical table). When an interrupt signal comes onto the chip, the CPU saves what it is doing and goes to the interrupt vector to find the address of the istruction that the interruupt is tellling it to execute instyead. Once it is finished with the interrupt, it goes back to what it was doing. The CPU fiinds what it was doing in a register called a stack. If interrupts were not possible, the CPU would have to compelte one task before it could staret another causing the seped to be gretly reduced.
Now that the CPU has found the operrating system, loadded it into memory, the operating sysstem takes over and the computer is now ready to be used by its owwner. The user can now check email, play a game, or do whatever they wanted to do when they started the computer.