₁₀ ₁₆ ₂
F1 and then d for decimal, h for hexa, b for binaryNote: when typing hexa number, do not use alpha.
Example: 1110.1₂
1*2^3 + 1*2^2 + 1*2^1 + 1*2^-1= 14.5₁₀
The integer and fractional part have to be converted separately.
Example: 57₁₀
| 2^n | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| Binary | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
| 64>57 so 0 | 32<57 so 1 | 16<25: 1 | 8<9 | 4>1 | 2>1 | 1==1 | |
| 57-32=25 | 25-16=9 | 9-8=1 | so 1 |
Example: to convert the fractional part of 2.65₁₀
| Calculation | Binary | rest |
|---|---|---|
| 0.65 * 2 = 1.30 | 1 | 0.3 |
| 0.3 * 2 = 0.60 | 0 | 0.6 |
| 0.6 * 2 = 1.20 | 1 | 0.2 |
| 0.2 * 2 = 0.40 | 0 | 0.4 |
The fractional part is .1010₂ with 4 number after the point
| Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
| Binary | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
To get the corresponding letter for number above 9, add their digits together, and get the corresponding letter. Ex for 12: 1+2=3, the 3rd letter of the alphabet is C.
Make group of 4 bits and convert them, starting from the right for decimal part and the left for fractional part, add 0 if necessary.
101111,101011₂ = 0010 1111,1010 1100₂ = 2F,AC₁₆
Convert each hexa number to it’s corresponding byte.
A8B = 10 * 16^2 + 8 * 16^1 + 11 * 16^0 = 2 699