Personal Computer - The Absolute Basics


The following is presented as a "basic" operating knowledge of computers. You will find that many modern computers are advanced beyond the basics, but they all still operate with these concepts in mind, and with binary representations of information.

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?

  1. You and I think in decimal numbers. But computers think in "binary" or base 2 numbers.

  2. There are several numbering systems with bases other than decimal (base 10), e.g. octal (base 8) and hexadecimal (base 16).

  3. In the decimal numbering system, we count to 9 as a single digit, and when we add one to 9, we say 10. So a 9 + 1 = 10 (or one 10, and zero 1 s.) Eleven (11) is one "10" and one "1".

  4. Notice in the chart at the right: One character in the base 16 can be used to represent any number up to 15. In decimal one character can be used to represent a number up to 9. In binary a bit can represent a 1 or 0, in base 8 you can only represent up to the decimal number 7 without a carry.

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:

  1. Fetch Cycle - gets the next instruction to be executed into a register.
  2. Decode Cycle - break down the instruction to see what to do.
  3. Execute Cycle - do the thing the instruction is supposed to do.

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)

  1. Each instruction is moved from memory to a register in the CPU by the fetch cycle.
  2. The instruction is then decoded, it determines that it is an add instruction, then the data such as A and B in the example above are retrieved and put in registers.
  3. The data in A and in B are added together and stored in a register.
  4. The register storing the sum of A and B is moved to a location specified as X. X takes on the value of the sum.
  5. The next instruction is 'fetched' from memory and the cycle goes on.
  6. Actually the steps above may be many small instructions. We will worry about details later.

More sophisticated, modern PCs often use more complex procedures in executing a program's instructions. Some of the modern techinques are:

  1. Pipelining
  2. SuperScalar
  3. Super Pipelining

These are techniques for executing more instructions during a given time. They will be discussed elsewhere.


Back to Basics Menu

Central Processing Units (CPU)

PC Operating Systems