0

I doubt because you have 9 multiplications and you are adding 9 numbers together, when using a 3x3 convolution matrix.

Adding 9 numbers: 1+2+3+4+5+6+7+8+9

We are performing 8 additions as we repeat the operation of 'adding' 8 times (8 times a '+' sign).

We can say there are 9 additions as well, if you would accept a definition like: 0+1+2+3+4+5+6+7+8+9

But what does make more sense for computers: 8 adds or 9 adds?

user8005
  • 133
  • 2
  • 9

1 Answers1

1

As you have 9 terms to add together, your computer will perform 8 additions as each addition needs two inputs. So you have 9 multiplications and 8 additions.

TJ1
  • 177
  • 5
  • A computer does memory operations as well, like pop and push (intel architecture). Those don't count as addition? – user8005 May 30 '13 at 03:53
  • 9
    Counting instructions is not the same as counting arithmetic operations. The instructions required to perform 9 muls and 8 adds may vary a great deal dependent on the target. – niaren May 30 '13 at 06:50