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

Binary: 00000010?

When the chart showing ones, twos, fours, etc was put up, this was the number at the top of the screen.

There are 8 places, but the chart had only 6 rows. So how do you figure this out?

2^0 = 1 = ones 2^1 = 2 = twos 2^2 = 4 = fours 2^3 = 8 = eighths 2^4 = 16 = sixteenths 2^5 = 32 = thirty-twos

1 Answer

Hi Allison,

Most simply, the 2s place in on (represented by the 1) , and off (zeros) everywhere else, so the decimal number= 2.

Here's another example: 0000 1010. You've got 1 in the 8s, and 1 in the 2s. 8+2 = 10.

To complete the chart, the remaining rows would be 2^6 = 64ths, and 2^7 = 128ths. Remember that for our purposes we're only counting from 0 - 255 in binary. It is, of course, possible to count higher than that, simply by adding leading bits (1 or 0). So if 255 = 1111 1111, 0001 0000 0000 = 256 because the 256th place has been added, and is on (1).

Does that help?

Best, Cena

Hi, yes it does. I was confused between the mismatch between the rows of the chart and how many places were in the number - 6 rows, but 8 places.