How to use
- Choose what to do: calculate with two hexadecimal numbers, turn a hex number into decimal, or turn a decimal number into hex.
- To calculate, type the two hex numbers (the digits 0-9 and the letters A-F, in capitals or small letters) and pick add, subtract, multiply or divide.
- Read the result in hex first, then the same number in decimal, binary and octal, how many bits it needs and its two's complement bytes.
- To convert, type one value. The working shows the place values for hex to decimal, or the repeated division by 16 for decimal to hex.
Formula
Each hex digit counts a power of 16, with A to F standing for 10 to 15, so 2AA = 2 x 256 + 10 x 16 + 10 = 682. To go the other way, divide by 16 again and again and read the remainders from the last to the first. One hex digit is exactly four binary digits.Example
8AB + B78 = 1423, which is 2,219 + 2,936 = 5,155 in decimal. Decimal 1500 is 5DC in hex. In India, the decimal side is grouped the Indian way, so F4240 shows as 10,00,000.
Numbers can be up to 1,024 digits long and every digit stays exact. Negative numbers are shown with a minus sign; the two's complement line shows the bytes a computer would store. Division gives a whole-number quotient and a remainder. Only whole numbers are handled.