All computers operate at base in Binary. Sometimes people call this binary or machine language. The languages people develop are often formulaic sort of like a shorthand algebra or something because it is hard for humans to think in binary language. For example,
Here is an easy conversion to see what I'm talking about:
Binary | Decimal | Hexadecimal | ||
---|---|---|---|---|
0 | 0 | 0 | ||
1 | 1 | 1 | ||
10 | 2 | 2 | ||
11 | 3 | 3 | ||
100 | 4 | 4 | ||
101 | 5 | 5 | ||
110 | 6 | 6 | ||
111 | 7 | 7 | ||
1000 | 8 | 8 | ||
1001 | 9 | 9 | ||
1010 | 10 | A | ||
1011 | 11 | B | ||
1100 | 12 | C | ||
1101 | 13 | D | ||
1110 | 14 | E | ||
1111 | 15 | F | ||
10000 | 16 | 10 | ||
10001 | 17 | 11 | ||
etc | etc | etc | For example, 5 in binary is 101 and 17 in binary is10001. But the same numbers in hexadecimal would be 5 and 11 as you can see. | So, it is easier to represent binary in hexadecimal than in the decimal system in regard to programming using machine language which makes it more convenient for programming whatever you want to do. |
No comments:
Post a Comment