Beacon's log has a new column, and it is full of 0s and 1s.
"01001011," Comet reads aloud. "That looks like a phone keypad having a bad day."
Wren laughs, then writes the eight place values above the bits. "Let's investigate. Where are the 1s?"
"In the 64, the 8, the 2 and the 1," Comet says slowly.
Nova lights up those four places. "And together they make?" she asks.
Comet adds on her fingers. "75. It is the morning water reading!"
"Now do it backward," Wren says, and writes 100 at the top of a fresh page.
Write the place values over the bits. Then add the place values that sit over a 1.
We call our everyday numbers decimal, or base 10.
place value: 128 64 32 16 8 4 2 1 bits: 0 1 0 0 1 0 1 1 add the places with a 1: 64 + 8 + 2 + 1 = 75
To go the other way, start at the biggest place value, 128, and work right.
If the place value fits into what is left, write 1 and subtract it. If not, write 0. Keep going until you reach the 1 place.
Convert 100 into one byte: 128 fits into 100? no -> 0 (100 left) 64 fits into 100? yes -> 1 (36 left) 32 fits into 36? yes -> 1 (4 left) 16 fits into 4? no -> 0 8 fits into 4? no -> 0 4 fits into 4? yes -> 1 (0 left) 2 fits into 0? no -> 0 1 fits into 0? no -> 0 100 = 01100100
| Statement | True or false? |
|---|---|
| 00000000 is 0 in decimal. | ? |
| 11111111 is 256 in decimal. | ? |
| The number 100 needs a 1 in the 64 place. | ? |
| A byte can hold the number 300. | ? |
Nice converting. Tomorrow's Beacon Lab uses paper bit cards and a curve.