Binary Counter?

This is the place for queries that don't fit in any of the other categories.

Binary Counter?

Postby godbrandont » Thu Oct 03, 2013 3:50 pm

I'm looking to make a counter in python that automatically counts up in binary numbers eg: 0, 10, 11, 100, 101, 110, 111, 1000, 1001 etc Automatically when you run the program but i'm not quite sure how i would go about doing it, thanks (Sorry i'm not that advanced at python, i am still doing my GCSE's and i'm trying to learn as much python as i can)
Last edited by Yoriz on Thu Oct 03, 2013 5:21 pm, edited 1 time in total.
Reason: First post lock
godbrandont
 
Posts: 1
Joined: Thu Oct 03, 2013 3:48 pm

Re: Binary Counter?

Postby Yoriz » Thu Oct 03, 2013 5:22 pm

Hi, welcome to the forum.
Please ensure you read the 'new users read this' link in my signature.

What have you tried so far and what problems did you encounter with your code?.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Image
User avatar
Yoriz
 
Posts: 1178
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: Binary Counter?

Postby Marbelous » Fri Oct 04, 2013 2:44 pm

Do keep in mind that ALL numbers in your computer are already in binary. They just get converted to a human readable form by python's print methods.

HINT: the bin() function will print binary representations.
Marbelous
 
Posts: 158
Joined: Fri May 31, 2013 8:12 pm


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot], W3C [Linkcheck] and 7 guests