I was browsing some C++ code, and found something like this:

```
(a + (b & 255)) & 255

```

The double AND annoyed me, so I thought of:

```
(a + b) & 255

```

(`a` and `b` are 32-bit unsigned integers)

I quickly wrote a test script (JS) to confirm my theory:

```js
for (var i = 0; i < 100; i++) {
    var a = Math.ceil(Math.random() * 0xFFFF),
        b = Math.ceil(Math.random() * 0xFFFF);

    var expr1 = (a + (b & 255)) & 255,
        expr2 = (a + b) & 255;

    if (expr1 != expr2) {
        console.log("Numbers " + a + " and " + b + " mismatch!");
        break;
    }
}
```

While the script confirmed my hypothesis (both operations are equal), I still don't trust it, because 1) [random](https://xkcd.com/221/) and 2) I'm not a mathematician, [I have no idea what am I doing](https://i.imgur.com/Boq967h.png).

Also, sorry for the Lisp-y title. Feel free to edit it.