answersLogoWhite

0

No. Even a simple binary add expression such as "0 + 1" is meaningless to a machine because it is far too high-level; far too abstract. Machine's only understand their own native machine code thus every operation must be converted into the low-level terms it can understand, and this usually means breaking the high-level abstraction down into a sequence of low-level operations.

The main operation of "0 + 1" is the ADD operator, but in order to invoke this operation we must first prepare the CPU registers, which typically means using the MOV operators. When we move an operand into a CPU register we either move its value (if it is within the range of a register) or we move its memory address, thus there are separate MOV operators to cater for each. For a simple ADD operation like this, we would typically move the first operand (0) into an accumulator register and the other into a user-register. We then execute the appropriate ADD operator which places the result in the accumulator. Finally, we execute another MOV operator to move the result back into main memory.

Note that even the ADD operator has several variants depending on whether the operands are integers or real numbers. For mixed-mode arithmetic the process becomes more complex because both operands must be of the same type and precision so at least one has to be converted (if the result requires a higher precision we must convert both to that higher precision). And if the converted operands or the result is too large for a single CPU register, we must break the operation down even further and perform the arithmetic in stages. This is not unlike the way we perform multiplication by multiplying the units, then multiplying the tens, and then the hundreds, and so on, before summing those products together.

But even before any of that can happen we first need to get those values into main memory. Those values might come from the user keyboard, from a user file, or from some other input device (perhaps even another program entirely) but, at some point prior to the ADD operation, we must store them in memory because that's the only way the computer can actually refer to them. And if we also have to present the result to the user, there are a variety of output devices to choose from (print the result on screen, in a file or send the output to a printer) each of which requires another series of low-level operations.

User Avatar

Wiki User

7y ago

What else can I help you with?