[Math] Why is there a different button for ‘minus’ and ‘negative’ on a calculator

arithmeticmath-software

Perhaps this is more of a programming question than anything else, and if so I'll gladly migrate it on over to StackOverflow, but I think this site might be a bit more suited. My question is: "why are there two different buttons for 'minus' and negative' on a calculator?". To my knowledge, they are treated the exact same way, the only different being that minus is binary, and negative is unary. Other than that, I don't see any difference. So why do calculators have two separate buttons for them? In programming languages, there is no distinction between the minus and negative signs, it is only calculators that make the distinction. Is it for the reason I stated, or is it something completely different? I don't see how the unary vs. binary would have anything to do with how a calculator computes something, but I can't think of any other reasons. Does anyone know why?

P.S. If it is for the reason I stated, could someone explain why that would affect how a computer calculates the value of an expression?

Best Answer

The negative sign multiplies the number by -1. Minus subtracts the number, which is a completely different operation. The difference lies in where you can use it, as a minus sign cant be used on the first number you write, as there is nothing to subtract it from, and you cant use a negative between 2 numbers, as there is no operation happening between them.

Related Question