Sunday, 8 September 2013

How to detect if a binary number has a 0 in Decimal

How to detect if a binary number has a 0 in Decimal

I have a binary number and I need to know if that binary number has a 0
anywhere in the number when I represent it as Decimal.
So, I can't convert it to a String or something like that.
I need some way to treat it just like a binary and detect it from there.
for instance
10111100101 = 1509
101111001011 = 3019
I need to detect those 0
ThankS!

No comments:

Post a Comment