Binary Representation
You might think that binary representation is a bunch of 0’s and 1’s organized haphazardly. But understanding how numbers are represented in binary is much easier than you’d think! When you think of an integer, say 1 or 2, you’re really seeing this number in it’s base-10, or decimal, form. If we change the power of the base that we use to represent a number, we can rewrite it into a different form.
Binary representation is in base-2 form. This means that every number is represented by 2 to the power of the number of its place in the string. For example, let’s say we would like to convert the integer 13 into binary. We know that 2^3 + 2^2 + 0 + 2^0 = 13. If we replace all of these ‘2^x’ statements with a bit (represented by a 0 or 1), we can convert 13 into binary as 1101. The ‘0’ in a binary string is put in place of a ‘2^x’ space in the string that is not used to create the number we desire. With this same example, if we were to flip the ‘0’ digit in 13’s binary representation, we could create 1111, which would be a representation of 15.
Look at this representation in Minecraft of a possible binary string. Every lantern turned “on” can be used to represent a 1, and each lantern turned “off” can be used to represent a 0. From right to left, we can consider the first lantern to be in the 2^0 space, the second lantern in the 2^1 space, and so on.
This is how we can represent 21 in binary using Minecraft. We can see that the 2^0, 2^2, and 2^4 spaces are lit up:












