Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPavel Liška
672 PointsPlease how to re-count binary into decimal numeric system. equation would be more than welcome. Thank you
This is first pleace vere I first stuck in this program. Please can someone advce me or give me a equation how to re-count decemal numeric system from binar numer system. Since I am Czech to get uderstanding of it just from her explaining where is used almost no graphic examples is very difficult for me.
3 Answers
Ahmad Abrar
9,133 PointsBasically, the digit all the way to the right has a value of 1. The next digit to the left has a value of 2. The next has a value of 4. The next has a value of 8.
And they keep doubling in value as you continue to add digits.
In your example, 00000001 means you have: (0 x 128) + (0 x 64) + (0 x 32) + (0 x 16) + (0 x 8) + (0 x 4) + (0 x 2) + (1 x 1) = 1
For another example, if you wanted to represent the number 135 in binary...you would need 128 + 4 + 2 + 1: (1 x 128) + (0 x 64) + (0 x 32) + (0 x 16) + (0 x 8) + (1 x 4) + (1 x 2) + (1 x 1) = 10000111
Jennifer Nordell
Treehouse TeacherWell let's take 1001001 for example:
We start at the right and work left. And we only look at the ones. I'm using the ^ character here to denote to the power of. For example 3^4 is equal to 81.
2^0 = 1 then we add 2^3 = 8 then we add 2^6 = 64
This gives us a total of 73. So the decimal value for 1001001 is equal to 73. Hope this helps!
Pavel Liška
672 Pointsyou are supper nice Thank you for finding time to answer my questiion. Now I reallyl got it once more thank both of you very much