Friday, February 1, 2013

The binary system


Binary is a numbering system where the numbers are represented using the numbers zero and one, this is infomática is very important since computers work internally with 2 levels of voltage which makes its natural numbering system is binary , for example 1 for ON and 0 for OFF.

All those who are dedicated to data is essential to this kind hablidad numbering. In this article I will explain a little how it is used and that is the binary system.
In binary, there are only two digits, zero and one. We are therefore of a system based on two, where 2 is the relative weight of each figure on which it is located to the right. That is:
n , A n-1 , ....., A 5 , A 4 , A 3 , A 2 , A 1 , A 0
The subscript n indicates the relative weight (2 n ) The style is similar to having all the numbering systems, including ours, are generated by combining progressive numbers of all the digits. In base 10 (decimal), when we arrived at 9, followed by a figure, but starting from the beginning: 9,10,11 ... in binary would be:
0, 1 (zero and one)
10, 11 (two and three)
100, 101, 110, 111 (four, five, six and seven)
1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111 (the eight to fifteen)
10000, 10001, 10010, 10011, 10100 ....
We know tell ... but if we get a very large number in binary ... how would we know what number is counting until we get to that number? Well, for that we use the following method: multiply each digit by its weight and will add all values. For example, given the binary number 11110100101:
1 1 1 1 0 1 0 0 1 0 1 - Binary Number
10 9 8 7 6 5 4 3 2 1 0 - Position - weight
1 × 2 10 × 2 + 1 9 + 1 × 2 8 + 1 × 2 7 + 0 2 × 6 + 1 × 2 5 + 0 × 2 4 0 × 2 + 3 + 1 × 2 2 + 0 × 2 1 + 1 × 2 0
=
1024 + 512 + 256 + 128 + 0 + 32 + 0 + 4 + 1 = 1957
As we can see everything is based on powers of two. For ease, we will have memory aprendernos powers of 2, at least until 210 = 1024. Also, when we are already familiar, we can perform the above step memory, without breakdown all multiplications and additions, simply head to one estimate.
Not the thing ends there. We must also learn to move decimal to binary numbers. To do this, divide by two and write down on the remains. The number in binary quotient will be the last of all traces followed in ascending order (from bottom to top). That is:
1957/2 = 978 Rest: 1
978/2 = 489 Rest: 0
489/2 = 244 Rest: 1
244/2 = 122 Rest: 0
122/2 = 61 Rest: 0
61/2 = 30 Rest: 1
30 / 2 = 15 Rest: 0
15/2 = 7 Rest: 1
7/2 = 3 Rest: 1
3/2 = 1 Rest: 1
Note that out as number: 11110100101
Now, what to spend on both systems if the number is not an integer? The solution is to separate accounts. If we 1957.8125, first pass the 1957 to binary as we have learned. Furthermore, we take the fractional part, 0.8125, and successively multiply by 2 until the product is 1. Take the integer part of each multiplication, in descending (top to bottom, or first to last):
0.8125 x 2 = 1625 - Part Whole: 1
0.625 x 2 = 1.25 - integer part: 1
0.25 x 2 = 0.5 - Part Whole: 0
0.5 x 2 = 1 - Whole Part: 1

The change from binary to decimal will be like with the whole, given that its weight will be 2-1, 2-2, 2-3, 2-4 ... starting with the first digit after the decimal point:
1 1 1 1 0 1 0 0 1 0 1. 1 1 0 1 - binary number
10 9 8 7 6 5 4 3 2 1 0. -1 -2 -3 -4 - Position - weight
1 × 210 + 1 × 29 + 1 × 28 + 1 × 27 + 0 × 26 + 1 × 25 + 0 × 24 + 0 × 23 + 1 × 22 + 0 × 21 + 1 × 20 + 1 × 2-1 + 1 × 2-2 + 0 × 2-3 + 1 × 2-4
=
1024 + 512 + 256 + 128 + 0 + 32 + 0 + 4 + 1 + + 0.5 + 0.25 + 0 + 0.0625
=
1957.8125
Simply, the more practice, speed and ease in conversions. In future articles we will see the complexities of computer systems and we must know this code. So the sooner you master it ... remember the slogan of the site: "This is a system. We are computer ".
Thank you!

0 comments:

Post a Comment