Hey there, Gamers and Game Makers!
In this week's blog, we're going to look at a simple way you can read binary and easily convert it to English text.
So, if you don't know much about binary then you probably just know it as a series of 0s and 1s and you'd be right. Binary is simply made up of 0s and 1s but the number of digits and their order is very important. You may see a long series of binary numbers with hundreds of 0s and 1s but we can actually break these down into simple chunks to work them out. Binary is simply a series of bits. Each bit being represented by a 1 or a 0. However, every eight bits make up a byte. So we start by separating our long series of binary bits into segments of eight bits.
Lets look at the binary here: 010001000110111101100111. We can simplify this by breaking it up into its bytes. That looks as follows: 01000100 01101111 01100111. So, we have three bytes here. Let's look at the first byte, 01000100. The first thing to note is that the first three bits of a byte determine if the text value is upper case or lower case. 010 means upper case while 011 means lower case. So we can see that our first byte is an upper case letter, 01000100. After that, the remaining bits starting from left to right have a numerical value of 128, 64, 32, 16, 8, 4, 2, 1.
If a bit is set to one, we add the numerical value associated with it to the numerical value associated with any of the other bits set to one, excluding the first three bits which remember determine if our text value is upper case or lower case. So as you can see the only bit set to one is the bit with an associated value of 4. Now if we check what the fourth letter of the alphabet is, we see it's the letter "d" and in this case we know it's an upper case "D".
If you go ahead and do the same for the other two bytes we have you'll see that they are both lower case letters and we find they are "o" and "g", thus spelling out the word dog. So, simple as that, you can now read binary. Give it a try for yourself.
Until next time!