First, we need to know what binary IS. Binary is NOT a language or code. Binary is a number system, just like our normal number system, which we call "Decimal" or "Base 10".
Number systems work off of a base number. Let's see why it's called base 10:
Let's take the number 9631. We can see that each digit has a meaning here:
However, if we express this with scientific notation, we see that each place is multiplied by 10 to a power that is always incremented or decremented. This is how all number systems work.
Now, let's say we want to express a value with as few symbols as possible. You could express numbers in a "Base 1", but that doesn't seem very efficient; here's the number 17 in base 1:
And nobody wants to count all of those ones. But if we use two as our base, we can suddenly have numbers that rely on one "bit" to construct.
Binary works by adding up numbers of 2 to the power of n, where n is a whole number. so, by adding numbers such as 1, 2, 4, 8, 16, and so on, you can create any number without reusing any of these values.
The way we express this is just as we do with decimal: largest to smallest.
So we have our numbers, but how does binary actually work? Let's take our number before, 17.
In binary, 17 is represented as 10001. The way this works is you have 2 to the 0 plus 2 to the 4. 16 + 1 = 17.
To put a number in binary, you have to keep subtracting these values until you get the number you want to zero. let's try 52:
20 - 16 = 4. 110000.
4 - 8 < 0. Ignore.
4 - 4 = 0. 110100.
Since we've reached zero, we don't need to use any more ones. If we do, we'd just increase the value.
That's just the basics. Don't quote me on anything.