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 triallonewolf13
Front End Web Development Techdegree Student 931 PointsHOW DOES 00001010=10? i AM SO CONFUSED. ANY NOTE TAKING TIPS FOR ONLINE LEARNING ON TREEHOUSE?
BINARY AND BITS
3 Answers
Jeff Muday
Treehouse Moderator 28,720 PointsYeah... this can be a little confusing. In this example, you are converting binary (base-2) to decimal (base-10). Each position of the binary number represents a power of two from (important to know) RIGHT TO LEFT. Each position from right to left represents zero or a power of two. The first position is 2^0 = 1, the second position is 2^1 = 2, the third postion is 2^2 = 4, the fourth position is 2^3 = 8, the fifth position is 2^4 = 16 and so, and so on.
In your case, positions 1 and 3 have a one there, all the rest are zeros.
2^1 + 2^3 = 2 + 8 = 10
I hope this makes sense
Jeff Muday
Treehouse Moderator 28,720 PointsCharlie's method works well and is another way to think through binary->decimal and decimal->binary conversion.
As you master these skills, you begin the journey to becoming one of the "elite" computer literati and this joke will make perfect sense-- "There are 10 types of people in this world, those that understand binary, and those that don't" ;-)
Good luck with your studies, may the math be with you!
Charlie Harcourt
8,046 PointsI can only do this on paper!! Jeff is very correct so please read his first to fully understand. Try writing the numbers down like I have below, then add the binary code underneath and finally add it up
126 64 32 16 8 4 2 1
0 - 0 - 0 - 0 1 0 - 1 0
so the 8 has a 1 underneath and so does the 2. This equals 8 + 2 which is 10
Charlie Harcourt
8,046 PointsI can't seem to get them to line up but try writing it down on paper.