0

That is correct but I believe you have misunderstood what the || operator does.

|| is the logical or operator, it's output is true or false, or in integer terms 1 or 0. The inputs are treated as logical inputs which means in C++ 0 = false anything else is true. Then the implements the boolean logic

```
OR truth table
A|B|Out
0|0| 0
0|1| 1
1|0| 1
1|1| 1
```

You could use bitwise |, that performs the boolean or operator on each pair of bits in the 2 variables, i.e. 0xF0 | 0x0F = 0xFF. But the output of | has the same number of bits as its largest input.

If that is pseudo code and a and b are 128 bit numbers then the easiest way to hold then is as an array of smaller integers, say an array of 4 32 bit integers.

You

This article has been dead for over six months: Start a new discussion instead