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 trialChris Hernandez
Courses Plus Student 44 PointsI don't understand the number represented by the byte 00000111. Need help understanding this whole system.
Need help understanding the byte coding. Don't understand how it all works. Someone needs to break everything down in baby steps.
1 Answer
Steven Parker
231,269 PointsIn decimal, each digit represents a power of 10, going from right to left. So the number "1247" is 7 one's + 4 ten's + 2 hundred's + 1 thousand.
In binary, each digit represents a power of 2, also going from right to left. So "00000111" is 1 one + 1 two + 1 four (for a total of 7). Just like in decimal, zeros to the left are unimportant. One special thing about binary is that the only digits are 0 and 1, so for each potential power of 2, you'll either have it, or not.
Here's one more binary example: "1011" is 1 one + 1 two + no four + 1 eight (for a total of 11). Remember, right-to-left, and go up one power of 2 each time.
Does that help?
JT Keller
12,731 PointsJT Keller
12,731 PointsThe first rule of computer science is that Google is your best friend. Quickly become comfortable using it, because almost any question that you could ask someone else already has. I've included a link to a solid description of the binary number system and how it works below.
TL;DR The binary number system uses base 2 instead of base 10 like what you encounter everyday.
num^num = exponent notation
Binary Explanation