 
 		for i in 0..<(64 * Swift.max(lhs.limbs.count, rhs.limbs.count))
 		{
-			let newBit = lhs.limbs.getBit(at: i) != lhs.limbs.getBit(at: i)
+			let newBit = lhs.limbs.getBit(at: i) != rhs.limbs.getBit(at: i)
 			res.setBit(at: i, to: newBit)
 		}
 


		for i in 0..<(64 * Swift.max(lhs.limbs.count, rhs.limbs.count))
		{
			let newBit = lhs.limbs.getBit(at: i) && lhs.limbs.getBit(at: i)
			res.setBit(at: i, to: newBit)
		}



		for i in 0..<(64 * Swift.max(lhs.limbs.count, rhs.limbs.count))
		{
			let newBit = lhs.limbs.getBit(at: i) || rhs.limbs.getBit(at: i)
			res.setBit(at: i, to: newBit)
		}

