Jaggu Playing with Balloons

  • + 0 comments

    The function (standard in G C++) will return the amount of bits set to one (in the binary representation) of the parameter passed (s in this case). So:

    __builtin_popcount(1) == 1

    __builtin_popcount(2) == 1

    __builtin_popcount(3) == 2

    __builtin_popcount(4) == 1