Binary Data

Introduction

As computers rely on electronics to process data, they are restricted, at a fundamental level, by the nature of electronics. Thus, all data that is processed, is at the level of electrical signals: signal, or no signal; abstracted to 1 and 0, or true and false. Perhaps you have seen, in movies or imagery, streams of 1's and 0's, such as 10100111110111010101101 . This is referred to as Binary data. The word "binary" means "composed of two things", and in this case the two things are the states "1" and "0".


Number Systems

Decimal

In our day-to-day life, we make use of the Base 10 numbering system called Decimal. Base 10 makes use of ten different digits, 0 1 2 3 4 5 6 7 8 9, which is why it is referred to as base 10. In addition, each digit's position is multiplied by 10 to the power of that position, where the right-most number is position 0, then the digit to its left is position 1, and so on.

So, for example, the number **1432" can be expressed as follows:

1432 (base 10) = (1 * 10^3) + (4 * 10^2) + (3 * 10^1) + (2 * 10^0) 1432 (base 10) = (1000) + (400) + (30) + (2) 1432 (base 10) = 1432 (base 10)

Binary

The Binary number system works the same way as the Decimal number system, except using Base 2. Which means it only makes use of two digits: 0, and 1. In addition, each digit's position is multiplied by 2 raised to the power of it's position, just as with Base 10.

Thus, "1101" in Binary can be expressed as follows:

1101 (base 2) = (1 * 2^3) + (1 * 2^2) + (0 * 2^1) + (1 * 2^0) 1101 (base 2) = (8) + (4) + (0) + (1) 1101 (base 2) = 13 (base 10)

Other

There are many different numbering systems, such as Trinary (Base 3), Hexadecimal (Base 16) or even Base 64, which is often used for encoding large chunks of data.


Converting to Binary

Converting from Decimal to Binary is quite simple. Here is a video tutorial to show you the procedure:

If you didn't pick up how I was converting Binary to Decimal previously, here is another nice video tutorial for the conversion from Binary to Decimal:


Exercises:

  1. Convert 50 (base 10) into Binary.
  2. Convert 1111 (base 2) into Decimal.
  3. Convert your age into Binary.
  4. (Self study) What is one common use of Hexadecimal?

Check your work using this online calculator: http://web2.0calc.com/#p

Continue to next section


Comments

comments powered by Disqus