flipBits(val) {
        return ((~val >>> 0) << (32 - this.bitWidth)) >>> (32 - this.bitWidth);
    }
Function to flip bits
@param {number} val - the value of flipped bits
@returns {number} - The number of flipped bits