Translating Binary to Text: The Hard Way

A Tutorial for those willing to Learn

Contents
1. Introduction
2. The Binary System
3. Converting Binary to ASCII (Text)

Introduction:
We’ve all seen binary code. We’ve come to think of them as a bunch of ones and zeroes in long strings…
010010101010101001101011

But these ones and zeroes can also represent decimal numbers. First off, I will show you how to read these numbers as the decimal numbers we’re used to in our daily life. Then, I will show you how to use those numbers and your keypad to translate them into text. Note that your computer doesn’t use the decimal system, so technically, when it converts binary to text, it doesn’t go through the process I will show you. This is just a divertive way of explaining you how the binary system works.

The Binary System:
Here’s a simple example of binary:
10101

Let’s think of the example above as empty slots:
_ _ _ _ _

First off, you read binary from right-to-left. It’s just the way it’s designed. The first slot from the right represents a value of one, the second from the right a value of two, the third from the right a value of four, the fourth from the right a value of eight, the fifth from the right a value of sixteen, and the cycle continues by multiples of 2. This will never change.

By putting a 1 or a 0 in those slots you are either saying you want to corresponding value that’s attached to that slot or you don’t. A 1 means yes, and a 0 means no. For example, putting a zero in the first slot from the right, but a 1 in the second slot from the right means you want a two, but not a one:
_ _ _ 1 0

As such, the number above equals to a decimal value of two.


Download This Article

0 comments:

Post a Comment