- Convert decimal to binary string using std::bitset int n = 10000; string s = bitset<32>(n).to_string(); // 32 is size of n (int)