First, computers operate using electrical current to represent "states" in the computer. The most basic state is "ON" or "OFF". For simplicity's sake, we will say the "ON" state is represented by a positive voltage, and the "OFF" state is represented by 0 voltage or a voltage negative to the "ON" voltage. The "state" I am talking about is not whether the computer is on or off; but instead if a "bit" (a binary digit) is on or off.
This is analogous to an electric light. It the switch is on, it is receiving approximately 110 volts. If the switch is off, no volts, and you are in the dark. Like now.
Most computers prior to the 1990's operated at voltages of +5 volts or greater for the "ON" state, and 0 volts to -5 volts for the "OFF" state. Currently, processors are operating at 3.3, 2.7, and even 2.5 volts. This is greate because the lower the voltage, the less heat is generated by the PC's processor and other components.
So, a binary bit has 2 values - a 1 or a 0. If we use the "extended ASCII" code, it takes 8 binary bits to make a "byte". A byte can be used to represent a character, number, or symbol. A byte might look like "10001001", and in the ON/OFF representation it would be "ON-OFF-OFF-OFF-ON-OFF-OFF-ON". Number Conversion Tutorial
Actually, characters, numbers, and symbols are represented by a number of binary bits. In most PCs, we use the "extended ASCII" code and it requires 8 binary bits (a byte) to represent a character, number or symbol. This is analogous to 8 contigious light switches in a row. Combinations of "ON" bits and "OFF" bits represent the characters, numbers, and symbols. Need it more basic?
So, computers use binary numbers to represent everything inside them. Computer instructions at the machine level are composed of binary numbers that direct the computer to perform actions. The instruction must tell the computer what to do (add, move, decision, etc.), what to use (which data to use), where to put the results, etc. Don't stop here, DATA or information is also represented as binary 1's and 0's; but they are sets of specific bit combinations for representing a set of characters. ASCII and EBCDIC code explanations.
How is a computer instruction executed? The most basic process is like this:
You see an instruction as "ADD A to B giving X". In computer instructions, this may take up to 20 simple instructions. Special computer programs called "compilers" take the "ADD A to B giving X", and translate them into "machine" language instructions which can be understood in your CPU!
So, all computer instructions are a set of binary 1's and 0's, arranged in a specific sequence to represent a machine or computer language instruction. A machine language instruction can be decoded and executed by the microprocessor (CPU).
Now, when a computer program is run on a computer, it is first loaded into a 640KB piece of memory. This 640 KB can be the conventional memory, or it can be a part of your extended memory (See Memory)
More sophisticated, modern PCs often use more complex procedures in executing a program's instructions. Some of the modern techinques are:
These are techniques for executing more instructions during a given time. They will be discussed elsewhere.
Central Processing Units (CPU)