()
| 173 | } |
| 174 | |
| 175 | func (bA *BitArray) not() *BitArray { |
| 176 | c := bA.copy() |
| 177 | for i := 0; i < len(c.Elems); i++ { |
| 178 | c.Elems[i] = ^c.Elems[i] |
| 179 | } |
| 180 | return c |
| 181 | } |
| 182 | |
| 183 | // Sub subtracts the two bit-arrays bitwise, without carrying the bits. |
| 184 | // Note that carryless subtraction of a - b is (a and not b). |