Binary counter | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Binary counter

Has anyone made a binary counter

10th Jan 2020, 7:29 AM
Charlie
Charlie - avatar
11 Answers
+ 7
1. Include the programming language you're using in the tags 2. Show us you attempt
10th Jan 2020, 7:42 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 6
Lothar that's just on python I guess. He didn't specify which language
10th Jan 2020, 1:50 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
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
10th Jan 2020, 9:54 AM
Lothar
Lothar - avatar
+ 4
https://code.sololearn.com/cLs2Ek5tcoMN/?ref=app They already mentioned the problem with your example tho. Charlie
12th Jan 2020, 5:24 AM
Issa
+ 3
What's that ?
10th Jan 2020, 7:33 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 3
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
10th Jan 2020, 2:45 PM
Ipang
+ 1
you input binary code it outputs real number
10th Jan 2020, 7:41 AM
Charlie
Charlie - avatar
+ 1
example input=001001 output=23
10th Jan 2020, 7:41 AM
Charlie
Charlie - avatar
0
The input code is wrong to implies it so let's specify unique code to unlock it at once
10th Jan 2020, 7:04 PM
Mutadi
0
How can you code
11th Jan 2020, 6:44 PM
Niso
0
😊😊😊😊😊
11th Jan 2020, 6:45 PM
Niso