Binary counter | Sololearn: Learn to code for FREE!


Binary counter

Has anyone made a binary counter

1/10/2020 7:29:12 AM


11 Answers

New Answer


1. Include the programming language you're using in the tags 2. Show us you attempt


Lothar that's just on python I guess. He didn't specify which language


This can be done with int() function. BTW: The output is not 23 but 9! #example input=001001 output=(23) -> 9 print(int('001001',2)) # output: 9

+4 They already mentioned the problem with your example tho. Charlie


What's that ?


I have no idea how that comes as 23 honestly. Can you show us some more examples? maybe there's a pattern or logic that can be comprehended if we can have some more examples Charlie


you input binary code it outputs real number


example input=001001 output=23


The input code is wrong to implies it so let's specify unique code to unlock it at once


How can you code