0

I haven't been able to find a conclusive answer to my query. Is there any way we can represent a number in its binary representation but as a string? Then convert that string to the 32-bit unsigned integer.

As an example suppose we have the following binary number:

00000000000000000000000000001011

We want to represent it as a string:

"00000000000000000000000000001011"

However, I want to convert this thing back to the binary number and, eventually, it's integer form which would be 11. Does anyone have any idea how to do this in python?

Usama Ahmed
  • 21
  • 1
  • 4
  • Answers [here](https://stackoverflow.com/questions/10411085/converting-integer-to-binary-in-python) and [here](https://stackoverflow.com/questions/8928240/convert-base-2-binary-number-string-to-int). – sj95126 Oct 09 '22 at 17:22
  • There is no "binary type" in Python. – Mark Ransom Oct 09 '22 at 17:22

0 Answers0