TOPIC 5.2.1
Increment &
Decrement
The reason that computers can increment and decrement faster than they can add and subtract goes back to the microprocessor. The microprocessor has special instructions that increment and decrement values in the microprocessor's registers. There are also special instructions for adding and subtracting. Adding and subtracting, however, use more complicated circuitry than the circuitry required to increment or decrement a number. Therefore, it takes a microprocessor longer to add or subtract than to increment or decrement.
For example, on the original 8088 microprocessor made by Intel (the processor that the 486 and Pentium evolved from), the increment instruction (INC) takes either 2 or 3 clock cycles to increment a value in a register. The addition instruction (ADD) can take anywhere from 3 clock cycles to more than 25 clock cycles, depending on the type of addition being done.
Note: A clock cycle relates to the clock that controls the timing in the microprocessor. For example, a 200MHz (megahertz) clocked microprocessor generates 200 milllion clock cycles per second.