bits1.size() == 64 possible bit positions. The bits that are on in bits1 are {0, 2} The bits that are on in bits2 are {1, 2} After: bits1 AND bits2... bits1: bit 0 is set? false bits1: bit 1 is set? false bits1: bit 2 is set? true bits1 = {2} After: bits1 OR bits2... bits1: bit 0 is set? true bits1: bit 1 is set? true bits1: bit 2 is set? true bits1 = {0, 1, 2} After: bits1 XOR bits2... bits1: bit 0 is set? true bits1: bit 1 is set? true bits1: bit 2 is set? false bits1 = {0, 1} Before any bits are cleared, bits1 = {0, 2} After clearing bit 0, bits1 = {2}