Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a difference between "addition" and "bitwise addition"?

Tags:

c#

As a little project (nothing mission critical), I decided to try and write an implementation of GOST 28147-89 in C#. However, while reading through RFC 5830 (an informational defining GOST 28147-89), I noticed this.

(+) is a bitwise addition of the words of the same length modulo 2.

[+] is an addition of 32-bit vectors modulo 2^32.

What is the difference between these two, mainly the first specifying bitwise addition, and the second simply stating addition?

like image 438
LMS Avatar asked Feb 15 '13 19:02

LMS


1 Answers

Since it says 'modulo 2', I have to assume that they just mean add each bit separately without carry.

So

  0101 
 +1111
-------
  1010

I can't think of a particularly good use for this, as it's essentially the same as an xor though.

like image 197
Tim Avatar answered Nov 07 '22 08:11

Tim