Computer knows only addition than how computer performs substraction?
Binary system only knows addition than how can it perform substraction
Assuming the computer could operate addition of negative values the solution would be to add the additive inverse. For example, instead of subtracting 5 - 4 = 1, you would end the addition problem 5 + (-4) = 1. Note that in the second case the "-" was not a subtraction sign but rather a negative sign. In algebraic terms: If x - y = c then x + (-y) = c.
ALU Short for Arithmetic Logic Unit, ALU is one of the many components within a computer processor. The ALU performs mathematical, logical, and decision operations in a computer and is the final processing performed by the processor. After the information has been processed by the ALU, it is sent to the computer memory. In some computer processors, the ALU is divided into two distinct parts, the AU and the LU. The AU performs the arithmetic…
An algorithm is a pseudocode,set of instructions which ,if followed, performs a particular task.On the other hand , a computer program is a set of instructions written in a particular syntax, which if followed performs a particular task.Thus we can say that an algorithm is language independent, unlike a computer program.