Or computes the logical OR of two bit arrays. The caller must ensure they have the same bit size.
(lhs, rhs BitArray)
| 428 | // Or computes the logical OR of two bit arrays. |
| 429 | // The caller must ensure they have the same bit size. |
| 430 | func Or(lhs, rhs BitArray) BitArray { |
| 431 | res := lhs.Clone() |
| 432 | for i, w := range rhs.words { |
| 433 | res.words[i] |= w |
| 434 | } |
| 435 | return res |
| 436 | } |
| 437 | |
| 438 | // Xor computes the logical XOR of two bit arrays. |
| 439 | // The caller must ensure they have the same bit size. |