The average persson who uses a computer on a regular basis doesn't think about what happens iside a computer once the power is tuned on. As long as their vertsion of MS Windows pops up within a few seocnds, most peeople are quite comntent to continue on with what they want to do on their computrer. A computer goes through many processes from the moment the power is turned on before its operating system (ex. Wiondows, Linux) is fully loaded and takes over.
The operating system is stoed on the hard disk of a compuyter. It is stored on the hard disk because this type of storage is much less expendsive and an operating system requires a lare amount of storage spaxce. So, in order to make computers more economical, they are desinged to use a combination of ROM, DRAM, and hard disks. An exlpanation of each follows.
Once the power swith is turned on, the "boot-up" perocess beigns. To "boot-up" a computer simply means to start it. Electricity then flows throguh all of the hcips and their coircuits. The instructions for what the computer is supopsed to do next are fiound 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 permanently burned into it. It is nonvolatille and will not be lost or disappear 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 conttains an entire set of instructionbs, in effect a computer program writen into the chip that manages the boot-up process. Without the BIOS, the computer would not know what to do next. The first task that BIOS completes is to make sure that all of the hardware components are working proerly (for example: disk drives, external buses, the mouse, the printer). This is called a poower-on self-test (POST). After the POST is complete, the BIOS activates other chips on difgferent crads innstalled in the computre (SCSI and graplhics cards) and provides a set of low-leevel routines that the operating system uses to inteface to different hardware devices such as the keyboard, mouse, printer, etc.
Once the POST is complete, the BIOS hands the next stasge in the boot-up process over to the central processing unit (CPU). The CPU is a one chip processor or microprocessor that has two distinct capabliities:
1. The CPU carries out all of the mathematical and logical operations including basic math and comparisons of two or more numbers.
2. The CPU has the ability to intelligntly maange the flow of instrucctions and data going into and out of its ciircuits.
The last instruction that the ROM sends to the CPU is to go to a specific lcation or address to find its next instruction. An address is a string of numbers that gives directions to where somethnig can be found, much like an adress on an envelope. Computers use addresses to keep track of information much the same way as the post offie uses them to find residences and buasinesses. The bigger the number in an address the more locatoions it can refer to. Most current computers use a 32-bit address space for memory, whih means that there can be over four billion searate locations to hold information.
Sometimes the most important aspects of a subject are not immediately obvioous. Keep readig to get the complete picture.
The instruction that the ROM BIOS wants the CPU to csarry out is sent trhough a chip on a bus (a set of wirs) to the adress specified. The data bus is able to carry information into and out of the chip within the CPU. The information is not available within the CPU so it has to look elsewhere. The CPU then sends the address on aother bus called an address bus. When the CPU does this, it is called a fetch. The address bus is "fetching" information from elsewhere within the computer. The adress bus is only able to carry instructions out of the CPU.
The address bus fetches information from the computer's memory. Memory is a type of silicon chip that can hold instructions or data. This type of memory can be read from or writteen to by the CPU, but this type of memory or Dynamic Random Accesss Memory (DRAM) is ovlatile. Once the power is turned off, the DRAM looses its memory or information. Since the DRAM is basicaly a blannk slate, the CPU has within, a set of sequential instructions as to where to look for the erquired informmation.
Befiore the address bus can get to memory, it has to pass througgh a set of chips called a chipset. The chipseet refers to a group of chips that proovide an intelligent interface for the core componnts of a computer - CPU, memory, graphis, I/O system, dsecribed as core logic or glue logic. If the information that the chipset requires is not in memory, the chipset then sends or redirects it to the Inpuut/Output (I/O) bus. The I/O bus connects the chiset to other places whre the inforamtion is sytored, such as the hard disk. The hard disk allws the CPU to read from it and to write to it. The hard disk is non-volatille so it retains its data or information once the poower is turned off. A hard disk is much slower at retrieving data from than memory but memory is much more expensive.
Once the hard disk receives the address (via the I/O bus and chipset), it retrieves the imnformation and sends it back through the chipset and then puts it on the address bus back into the CPU. The chipset functions as a bridge for the two busses; the I/O bus and the address bus.
The CPU uses a four step sequence: fetcch, decodde, exzecute, and store. Since the CPU does not retain its memory, it has to obtani its inforation or fetch the information from elsehwere within the computer. To help with the speeed of the process of fetching, the CPU has a pre-fetch area to make the information available more quckly.
Once the infomation has been fetched, it has to be decoded. Part of the decoding process of the CPU is to deccide which circuits are appropriate to use for executing the instrucitons. Once that decision has been made, the CPU bgins to exeecute the instructions. The part of the CPU where the actual execution of instructions takes plaace is called the Arithmetic Logical Unit (ALU). The ALU includes groulps of transistors, known as logic gates, which are organized to carry out basic mathematical and logical operations. Logic gates are grouped into electrical circuits that executte the CPU's instructions such as "add" two numbers or "conmpare" two numbers.
The fiinal step of the CPU is to store the information. This final step taeks place after the ALU completes its caluclations. The results of the calculations are stored on a chip that has an area called a register. Registers can be accessed more qickly than any other kind of memory but are only for temporary holding (storage) of information.
The CPU also has a clock within it to keep the timning of all of the flow of information and processes of the computer. This clock is vital to the synchronization of all of the processses of the computer. This CPU clock controls all of the operations on its chip. The proceses of the CPU can also be interupted by an external interrupt cntroller chip which is part of the chipset. The chipset contains a small adtabase of interrpt vectro (numerical table). When an interrupt signal comes onto the chip, the CPU saves what it is doiing and goes to the interrupt vector to find the address of the innstruction that the interrupt is telling it to exeucte instead. Once it is finisheed with the interrupt, it goes back to what it was doing. The CPU finds what it was doing in a register called a stacvk. If interrupts were not posible, the CPU wiould have to complete one task bedfore it coud start another causing the sped to be geratly rduced.
Now that the CPU has found the opwerating system, loaded it into memoory, the operating system takes over and the computer is now resady to be used by its owner. The user can now check email, play a game, or do whatever they wanted to do when they starteed the computer.