How To Read and Write Binary Code

Writing binary code

Computers use the binary code in its system. It shows numbers or numeric values with a 1 or a 0, or a combination of both. Each number gets a unique representation of ones (1)s and zeros (0)s. The binary code is not limited to just numbers but includes the alphabet as well. Almost everything on your computer is represented by the binary code. This is the only language that the computer will recognize, so programmers must have a good understanding how things are represented by the binary code. Information, commands or instructions that are sent over to other digital devices or computers are represented with binary code so it would make the transfer of data more efficient and exact. Since there are specific codes for everything, even color, you know if you send or share a file to another computer, it would look exactly as the original message or information. The on and off switch for example on a laser is controlled with binary code so one set of binary code will turn on the laser and another set will turn off the laser.

1. Difference between base 10 and binary. Base 10 numbers are the numbers or digits we see everyday. These are the numbers that everyone knows and sees the same way. Binary code on the other hand represents each number with either a 1 or a 0 or a combination of (1)s and (0)s. In base 10 numbers, digits need to reach a value of ten before it can move on to the next digit, binary code only needs a 1 or 0 before moving on. Each number in base 10 sits in a column signifying its place in the value, 1s, 10s or hundreds. Binary code has columns too but are represented and interpreted differently.

2. Binary numbers. Binary code uses columns represented with:

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

You will notice each column from the right doubles itself.

So picking a number like 34 for example, and starting from the leftmost column which is 128, you ask how many times the value 128 appears in the number 34. In this case none, so you put in a 0 under the column 128, same question holds true for other columns so 64 gets 0, 32 appears once in 34 so now you subtract 32 from 34 you’ll get a new number which is 2 from the total. You proceed to the other columns with the new number, 16 does not appear in the number 2, nor does 8 or 4 so we put a value of 0 in each column. But it does appear once under the 2 column so we put in a value of 1 and 0 in the 1 column because from the 2 column we subtracted the number 2 from the value 2 column giving us a total of 0. Our final binary number is 100010, so the number 34 is represented by the binary code 100010.

Everything on your computer is represented by the binary code; all digital files are represented this way. The alphabet is also represented this way, each letter uppercase and lowercase has a base 10 number which you use to convert to binary code.


Share this article!

Follow us!

Find more helpful articles: