Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Digital Literacy Computer Basics Computer Basics Binary

What number is represented by the byte 00001000?

10

3 Answers

Steven Parker
Steven Parker
212,257 Points

Click this link to see the answer I gave to someone asking the same question back in 2017. :wink:

Brandon White
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Brandon White
Treehouse Moderator

Hi John Tunji,

Understanding binary can be a bit tricky.

00001000
first off: You're counting left to right
two: You start at the place of the first 1 you see.
the 1 is in the eights place, which means that number produced by the byte can't be less than eight 
    (specifically it'll be between 8 and 15, but the value of the bit in the eights place is 8)
then you check the value of the bit in the fours place 
    (if it too is 1, then you add the value of the fours place, which is 4 to 8)
    (otherwise, you add 0 to 8)
    and so your running total is 8 + 0 = 8
then you check the value of the bit in the twos place
    (if it too is 1, then you add the value of the twos place, which is 2 to the running total)
    (otherwise, you add 0 to the running total)
    and so your running total is 8 + 0 = 8
then you check the value of the bit in the ones place
    (if it too is 1, then you add the value of the ones place, which is 1 to the running total)
    (otherwise, you add 0 to the running total)
    and so your running total is 8 + 0 = 8

the entire equation would look like this: 8 + 0 + 0 + 0 = 8

Hope that helps make it easier to understand.