To Convert bigint to bitmap: Use bitwise operations → bitmap = bin(bigint)[2:] or bitset in C++. Count 1s in bitmap: Use popcount() in C++ (__builtin_popcountll(bigint)) or Python’s bin(bigint).count('1')