if you use int as binary digit, you can get only number as big as int. In my system it would be number 1111111111. Can get any larger number. But if you take a string, you can get binary off any size. But you won't be able to use it in int calculations like you do in your code.
if you take a string, you can get binary off any size. But you won't be able to use it in int calculations
It's true you couldn't use the string directly in calculations.
But its simple enough to convert the binary string to a real integer, either by using a built-in function such as strtol(), or by writing a short piece of code to do the same job.
Although you could put forward arguments in favour of either approach, personally I'd take the string as my first choice.