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 trial

Digital Literacy Computer Basics Computer Basics Binary

Tony Soza
Tony Soza
103 Points

Can anyone break this down even simpler because I'm for some reason having a really hard time with this.

I'm not sure how to get 00001000 or really how 00000011=3 and 00000111=7 can someone break this down into a simple step by step process?

3 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Tony,

Binary code uses only 1s and 0s, but there is a system to figure it out. The course (and the real world doesn't expect you to be able to read binary as simply as you read this answer, but broken down the best I can is...

Binary (in a sense is read left to right (opposite of English).

In Binary 1 = on and 0 = off (so if it is on, you count it)

From right to left, the Binary = 1, 2, 4, 8, 16, 32, 64, 128, etc...

So, 000001001 would be 9 because the first one (from the right) is ON and that is 1, so you count 1. The second and third one is off, so you don't count them, and the fourth one (8) is on, so you count it. Thus, 1 + 8 = 9.

I hope this helps and clears it up a bit.

Keep Coding! :)

Tony Soza
Tony Soza
103 Points

Yes, it helped sooooo much thank you!

LaVaughn Haynes
LaVaughn Haynes
12,397 Points

When you are first learning to count as a kid and you see the number 573 and you learn that the 3 is in the 1's column, the 7 is in the 10's column, and the 5 is in the 100's column.

(One 3 + ten 7's + One Hundred 5's) = (500 + 70 +3) = (573)

In the binary system instead of those columns being "100,10,1" they are "4,2,1"

so with 011 you have 1 in the 1's column, 1 in the 2's column, and 0 in the 4's column.

(One 1 + two 1's + four 0's) = (1 + 2 + 0) = (3)

00000111 = (One 1 + two 1's + Four 1's) = (1 + 2 + 4) = (7)

In base 10 from right to left the column values are

  • 10 to the 0 power = 1

  • 10 to the 1 power = 10

  • 10 to the 2 power = 100

and so on

In binary it's

  • 2 to the 0 power = 1

  • 2 to the 1 power = 2

  • 2 to the 2 power = 4

and so on

Tony Soza
Tony Soza
103 Points

Thank you, too, for helping I appreciate it!

kevinardo
seal-mask
.a{fill-rule:evenodd;}techdegree
kevinardo
Treehouse Project Reviewer

Here are some additional video sources Tony. https://www.youtube.com/watch?v=hacBFrgtQjQ Very good explanation and some counting techniques.

And here is one that is a little longer https://www.youtube.com/watch?v=0qjEkh3P9RE The same here, good explanations and some different counting techniques. Together with what the others have written i think we can start to dream in binary now :D

GL!

Tony Soza
Tony Soza
103 Points

Thank you so much, bro!