Can I Have Your Number! Why different based number systems are important to programmers.

Ricardo Jean-Pierre
4 min readOct 30, 2018

--

It was in the third grade, I’ll never forget that day where our teacher had all of us stand in the back of the class reciting portions of the multiplication table as well as simple addition and subtraction problems that you can answer just by rote memory. It was a math bee. Needless to say, I had evicted myself from the competition early and at that moment, had decided that I will never have anything to do with math or with numbers for that matter. Fast forward to 2018 and I’m in a coding bootcamp.

Even I had always been fascinated with tech and computers I’ve always dissuaded myself from studying computer science (which may have been a good decision) because I thought that it would consist of typing calculus equations in to a computer and somehow coming up with a program. Or typing a bunch of 1’s and 0’s into a black backdrop. Now that I know better, I realize programming just an abstraction, a tool that is used by us to solve problems. But to be good developers it helps to have an understanding of the non abstract level.

I had my second run into numbers while learning about the partInt() function. Where you have the argument of taking a string and converting it into a number datatype. Fair enough; except that I had issues with that second option argument, the base. Apparently there is a base 10 argument as well as this binary base neither of which I had a clue of. No longer would I be content with glossing over what these bases are which ultimately led me to learn what numerals are.

According to (enter definition). So in short numerals are a system of symbols used for the purpose of math, counting and computing. The base refers to the amount of symbols used to for the purpose of counting. Even though I was aware of one other numerical form which belonged to the Romans, it never occurred to me the vast amounts of numerical bases each serving a purpose. The numerical system that takes particular interest is the binary system.

What makes the binary system so unique is that it only consists of two symbols which are 0 and 1. With these two symbols we are to do all of the regular functions we would with base ten number. It has been around since ancient history but it gained popularity when Gottfried Leibniz shaped binary numbers to what we know today.

To decipher an example, you read the number from right to left starting with the power 0 you use the base 2 and multiply that from whatever number you are given. In this case it will either be 0 or 1.

Finally you take the sum of your results and viola! You have your number. Counting forward is easier.

So now that we have an idea about binary numbers, why do we have to know this as programmers? It’s because on the lowest level, all computers run on this binary system.

The first modern computer was built in 1936 by whom we consider the father of computer science Alan Turing. What made his invention possible all boils down to the binary system which the Turing machine consists of transistors that turned on or off. When the transistor is off it would be represented as 0 zero and when it’s on it would be 1. The machine was programmable and able to write symbols on a paper. Fast forward 1963 and we have the American Standard Code for Information Interchange which was not only a standard for converting numbers but also using adding symbols and letters for communication.

To better understand how computer talk will make us better programmers in the long run. The languages that we primarily use are very abstract but they all compile down to machine code level which the computer understands. To have a basic idea binary numbers and how they play an important role in what we do will help us be more effective programmers.

--

--