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 trialsubodh kumar
Courses Plus Student 96 Pointsi did not understand about binary coding
binary coding
3 Answers
anil rahman
7,786 Pointsif you think of this binary code: 0001
it is basically start from the right side: starting with that 1: 0001 <- this
Every time that right hand side number represents a 1, so from then on moving to the left your are basically timsing by 2, so start with 1 then you move left and you do 1 times 2 which is 2 so that second column on the right value wise is 2. You repeat you times that column by 2, 2 times 2 = 4. You move again to the left and times that column value by 2 which would be 4 times 2 = 8. so now you know that this: 0000 is just placeholder values for the numbers 1,2,4 and 8 but starting with 1 from the right side so you read it like 8,4,2 and 1 which is what the 0000 is representing. So if we have 0001: and we want to know what that 1 means it is basically saying ok in my placeholders which are 8,4,2,1 my 1 placeholder has a 1 now not a zero meaning i have 1 in my 1 column so the answer would be 1. If i were to say ok whats this value: 0111
I would do ok so i have a 1 in my 1 column so so far my sum is 1, i have a 1 in my 2 column meaning i have a 2 so the sum so far is 3 because i have 1 in my 1 column and 1 in my 2 column. Remember we are not adding these 1's we are adding the values that these 1's represent like the 8,4,2,1 numbers. Last we have a 1 in the 4 column so the sum here is the 4 + 2 + 1 = 7.
subodh kumar
Courses Plus Student 96 Pointsthanks buddy
Bryce Santos
11,157 PointsWhich part didn't you understand?
subodh kumar
Courses Plus Student 96 Pointsmy concept has been cleared thanks for ur reply
A X
12,842 PointsI agree with Bryce, it's hard to know how to help if we don't know what you're struggling with. There are also many other posts already on this site that answer basic questions about binary...including a few that I've contributed to. You can always search for questions about binary and see if those help you too.
anil rahman
7,786 PointsI don't know if that helped or if you already figured it out but you're welcome :)
A X
12,842 PointsA X
12,842 PointsSubodh, can you provide us with more information about what specifically you're struggling with? There are also other people that have asked about binary here: https://teamtreehouse.com/community/topic:digital-literacy/q:binary-code perhaps take a look at some of those answers?