Abe Kornelis correctly notes: > To my mind, this is *effectively* subtraction, even when *technically* the processor performed addition.
Others make equally correct statements, some offer amazing insights, and yet others say amazingly stupid things. This discussion is all over the map -- interestingly, but needlessly. I'm amazed by the "active, enthusiastic discussion" related to this issue. Some folks say it's [effectively] subtraction, while others _insist_ that it's [only] addition. Some of the active discussion participants seem to think that it must be [treated as] one or the other and it can't possibly be both. The rules (see POPS) are established and well-documented. Some interpret those rules as saying "only" addition is done. Others interpret those rules (or their effect) to conclude that one can so "make the machine do [effective address calculation] subtraction." Wow. Two groups of folks who insist that their interpretation or view of the [mainframe internals] world is correct, and that the other camp is clearly wrong. So which is it? IMHO, this "problem" is entirely in folks' minds. The plain and simple fact is that apples [what the HARDWARE does] and oranges [what the ARCHITECTURE says] are being compared; few seem to have realized that, and fewer still have stated it succinctly. But at the lowest hardware level, one could assert (as several already have) that ONLY _addition_ is being done. That's how the logic circuits that "do" (all of) these things work, period. They _are_ ADDERs. There are _no_ SUBTRACTERs. So how does the machine do subtraction? By complementing one operand and then ADDING the two together. For a base 10 example, see http://www.mathsisfun.com/numbers/subtraction-by-addition.html. The rules for doing this are quite well stated in literally boatloads of books and references available online. Subtraction is done by adding. No processor has duplicate hardware circuitry for subtraction; they all have (only) adders. Coming up with the appropriate complement of an operand (to be, ahem, "subtracted") is (literally) free: it requires no machine cycles on modern processors, just logic circuits (as soon as the original operand is available at the next _internal_ clock cycle, the required complement is also simultaneously available at trivial gate cost. So does this mean that those who say "it's ONLY addition" are right? NO, it's the _MACHINE_ (the _HARDWARE_) that "only" does addition. The _processor_ can most certainly do "subtraction" -- that is, produce a result that makes sense, mathematically and logically, as the _difference_ between two operands. But the HARDWARE _does that_ by arranging for an _addition_ to be carried out. How one INTERPRETs what the machine does depends upon how the operation affects the result given the input [operands] and/or how the result will be used. Some folks interpret the result as "only" addition, while others interpret the same result as "effective" subtraction. Well, it's BOTH ... depending on your point of view or how the result is going to be used. It's all in your mind. It depends. Both are correct. Neither group is wrong. But at the lowest level of the machine, inside the silicon, at the actual HARDWARE level (which is, I would like to point out, actually _irrelevant_ to this discussion, since we are talking about the ARCHITECTURE [and neither the IMPLEMENTATION nor the REALIZATION] of the instruction processor), it's all addition. So what? We do not program the hardware (the actual bit/data flow inside the silicon); we program at least at the _architectural_ level, which is two (2) levels _up_ (or _away_) from the HARDWARE (that is, the _realization_, using Brooks' terms). Actually, we program one (1) level up from that level: we program in Assembler (in contrast to machine language, which is what the architecture [POPS] actually describes). So, pick you side (interpretation) and be happy that you are correct in your belief/assertion (regardless of which side you choose to sit on). Subtraction _IS_ done, but BY doing addition (that is, what the hardware weenies describe as the operation of an ADDER). Have it your way! Calling it "effective" subtraction neither detracts from the fact that it is "actual" addition nor from the fact that the result can be validly interpreted as -- and in fact "is" -- a _difference_ (hence, it's also "actual" subtraction -- done by "actual" addition [at the architectural level, as well as at the realization level]). It's all in your mind. Neither side can claim to have won this argument, because both are correct. I suspect that there are some who will dispute this, but their attitude is what caused this bogus issue (but interesting discussion) to arise in the first place. -- WB
