|
"Why do you read binary digits right to left?" |
|
|
| Written by Diana, on 01-08-2007 04:30 |
| Views |
370  |
|
|
|
I came across this question on http://wiki.answers.com/ and I couldn't help but put in my two cents:
Question:
Why do you read binary digits from right to left?
Answer:
Binary digits are read right to left the same way numbers increase from right to left (our system of base 10). Numbers do not increase the same way we read (left to right). This is the same way we add, multiply and subtract in math. We start from the numbers on the right and move left if you prefer to think of it that way.
With our usual system of base 10 numbers, each digit starts from "ones", then "tens", "hundreds" and so on moving from right to left. The same is with binary except that binary is only base 2. A 1 in the first position = 2^0 = 1. A 1 in the second position = 2^1 = 2 where each "one" is added for the final value. See below for examples.
Our base 10 system goes one more step by mulitplying each number as you go, expanding on the zeros and ones to zeros through nines:
5062 = 2*(10^0)+6*(10^1)+0*(10^2)+5*(10^3) = 5062
For a binary example, if there are 8 bits in a byte, we get the following possibilities:
00000000 = 0
00000001 = (2^0) = 1
00000010 = (2^1) = 2
00000011 = (2^0)+(2^1) = 3
and so on and so forth...
10101011 = (2^0)+(2^1) +(2^3)+(2^5)+(2^7)
= 1+2+8+32+128
= 171
and finally
11111111 = the sum of 2^n where n stands for the numbers 0 -> 7
= (2^0)+(2^1) +(2^3)+(2^4)+(2^5)+(2^6)+(2^7)+(2^8)
= 255
I love numbers ;-)
Last update: 01-08-2007 04:30
Users' Comments (0)
|
|
|