An introduction to binary – Part 1

10 10 2008

Decimal revisited:

Before you start to understand binary numbers, you must first understand the decimal numbering system:

Let’s start from a very simple number:

What does that number mean? Well, we may say that:

123 = 100 + 20 + 3

or

123=(1 \times 100 + (2 \times 10) + (3 \times 1)

Considering that (for those that are not familiar with logic, the “upside down V” means “AND”, and the arrow means “IT IMPLIES THAT”):

(100 = 10 ^ 2 \wedge 10 = 10 ^ 1 \wedge 1 = 10^0) \Rightarrow \\ (123=(1 \times 10^2) + (2 \times 10^1) + (3 \times 10^0))

So, we can say that:

Now we can see a pattern here: considering that the rightmost digit in our number is called the less significant and the leftmost is the most significant, we might say that the most significant digit has the exponent 0 and as the digits become more significant, the exponent is incremented. From now on, we’ll call as n the position of a digit, starting from the less significant digit.

Digits x Alphabets:

Now the question is: why are all the digits multiplied by ?

Let’s go back to basics:

We can express any integer number in the decimal system using the “alphabet” defined on this set:

And, if you have half a brain, you’ll be able to count and notice that we have 10 (TEN) digits on this set. So, we say that the base of the decimal system is the number 10 (TEN).

If we dig a bit deeper, we can understand why the numeral “10″ represents the number TEN:

Using just one digit, we are able to represent the following numbers:

How do we represent the next number?

Well, consider that 9 can be represented as 09, what we do is just increment the leftmost number and “reset” everything on its right:

First thoughts about binary:

Now that we understand about the decimal system, just wonder how could we represent integer numbers using an alphabet with only two digits (BInary has the prefix BI, that means 2) defined as:

Just a tip:

Want to know more? See An introduction to binary – Part 2

CodeCogs - An Open Source Numerical Library

Advertisement

Actions

Information

One response

14 10 2008
An introduction to binary - Part 2 « leonardopires.net

[...] * This post is a continuation for: An introduction to binary – Part 1 [...]

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.