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 trialAlvin Myler
89 PointsWhat is the best way to find the # of binaries for 00000011?
I'm having trouble remembering how to accurately understand the way we count binary functions. Please help me to better understand an easier alternative for mastering these numbers.
1 Answer
james south
Front End Web Development Techdegree Graduate 33,271 Pointsit really works just like base-10: you are simply counting how many of the base^x there are in each number position. in base 10 we count by 1s, 10s, 100s, etc, those are simply powers of 10: 10^0, 10^1, 10^2 etc. the highest we can go in a position is the base minus 1, so 9 in base 10. once you have 9 10s for example, you can't have any more 10s without needing a 100. base 2 works the exact same. each position is a power of 2 this time though, so we count by 1s, 2s, 4s, 8s, 16s etc, and the highest we can count in a position is 1 (base of 2 minus 1), so once we have a 1 in a position we can't have any more without needing the next highest position. so 011 is three, if we want four, well we have a 4s position, so we put a 1 there and 0s for the 2s and 1s, we don't need those to count to 4 when we already have a 4, so 4 is 100. 100 in binary is simply saying 0 1s, 0 2s, and 1 4, or 2^2.