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

i don't understand the binary well , how 00000011 =2 or 3 ?

plz help me if 2xX=11 then X=5.5 !! plz can you explain the binary well for me ?

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi Karim! Binary can be tough for people starting out. I've drawn up a little table that might help explain it better. When converting from binary to decimal we always start on the right side and read to the left. :arrow_left:. Because anything times 0 is 0 we only need to pay attention to the spots where there is a 1 recorded. In my chart I'm using the ^ symbol to denote "to the power of". So 2^3 = 2 x 2 x 2 = 8.

| 128  | 64  | 32  |  16 | 8   | 4   | 2   | 1   |
|______|_____|_____|_____|_____|_____|_____|_____|
| 2^7  | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
|  0   |  0  |  0  |  0  |  0  | 0   |  1  |  1  |

As you can see, our ones occur in the 2^0 column and the 2^1 column. So 1 + 2 = 3. Hope this helps, but let me know if it needs more clarification! :sparkles:

then 00000111 = ? & i will be understood:))

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

If you're asking what 00000111 is equal to, add up the columns. Take a look at the table above. The ones would line up with the 1, the 2, and the 4. Add these together and you get 7.

If we had 00100111 then they would line up with 1, 2, 4, and 32. That would bring the total to 39.

Hope this clarifies things! :sparkles:

i understood , thank you :))