Why does adding `0.1` ten times not equal `1.0`, and what does the computer storing numbers in base 2 have to do with it?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
In base 2 each place is a power of two and each digit is 0 or 1, so a binary number is just the sum of the place values whose digit is 1.
In the pattern 1011 the 1 bits sit at the places worth 2 ** 3, 2 ** 1 and 2 ** 0. Add up exactly those place values and assign the decimal total to binary_value.