What is Hexadecimal System?
The numbering system which uses
Digits
In Java and many other programming languages
For example, in hexadecimal the value of Zero is represented as
0 = (
Similarly
1 = (
2 = (
...
9 = (
10 =
15 =
Now, lets try representing Twenty One (21), remember we can use 0 to 9 and the alphabets A to F to represent 21, let us divide 21 by 16 and write down [quotient][reminder], i.e.:
21 =
Similarly, lets try representing One Hundred and Sixty (160), let us divide 160 by 16 and write down [quotient][reminder], i.e.: [10][0], [A][0] (since 10 is represented by A)
160 =
Similarly, lets try representing Three Thousand Four Hundred and Sixty (3460). Let us divide 3460 by 16 and write down [quotient][reminder], i.e.: [216]
3460 =
- In Hexadecimal System, a base of
10 is used - Decimal
100 is equal to0x64 in Hex - Hex value of 0xCAFE is equal to Decimal 51966
0x0001 in Hex is equal to0X1 in Hex and is equal to 1 in Decimal
0 Comments