bits[i] = fullSubtractor(bits[i], 0, borrow);
}
return *this;
}
self& operator+=(const self& x) {
bitsetAdd(bits, x.bits);
return *this;
}
self& operator-=(const self& x) {
bitsetSubtract(bits, x.bits);
return *this;
}
self& operator*=(const self& x) {
bitsetMultiply(bits, x.bits);
return *this;
}
self& operator/=(const self& x) {
std::bitset<N> tmp;
bitsetDivide(bits, x.bits, bits, tmp);
return *this;
}
self& operator%=(const self& x) {
std::bitset<N> tmp;
bitsetDivide(bits, x.bits, tmp, bits);
return *this;
}
self operator~() const { return ~bits; }
self& operator&=(self x) { bits x.bits; return *this; }
self& operator|=(self x) { bits x.bits; return *this; }
self& operator~=(self x) { bits ~= x.bits; return *this; }