Field guide
| Field | What it does | Example |
|---|---|---|
| Convert between bases | ||
| Number | The integer to convert. Letters are not case-sensitive, spaces and _ are ignored, and the prefix of the chosen base (0b, 0o, 0x) is allowed. | 0xFF (hex) = 255 |
| Base of the number | The base the number is written in. “Other bases” adds bases 3 to 36, and digits above 9 are A (10) to Z (35). | ZZ₃₆ = 1295 |
| Converted values | The same number in binary, octal, decimal and hex, plus the chosen base if it is another one. Binary is grouped in fours from the right. | 255 → 1111 1111, 377, 255, FF |
| Calculate in a base | ||
| Base (input and result) | A and B are read in this base and the result is shown in it. Choose binary, octal, decimal or hex. | Hex: FF + 1 = 100 |
| First number (A), Second number (B) | The two integers to calculate with. They follow the same input rules as “Number”. | |
| ÷ Divide (quotient and remainder) | Integer division. The quotient is rounded toward zero and the remainder takes the sign of A. | −7 ÷ 2 = quotient −3, remainder −1 |
| AND | A bit is 1 only where both numbers have a 1. | 1100 AND 1010 = 1000 |
| OR | A bit is 1 where either number has a 1. | 1100 OR 1010 = 1110 |
| XOR | A bit is 1 only where the two numbers differ. | 1100 XOR 1010 = 110 |
| Result | The result in the chosen base, with its decimal value shown below unless the base is decimal. | 1010 + 0110 = 1 0000 (decimal 16) |
Frequently asked questions
Why does 0b11 give 2833 in hex?
The prefixes 0b, 0o and 0x are removed only when they match the chosen base. In hex, b is a digit worth 11, so 0b11 is read as B11₁₆ = 2833. Choose binary before entering a binary value.
Why do I get “… is not a valid digit in base …”?
Every digit must be smaller than the base: binary allows only 0 and 1, octal 0–7 and hex 0–9 and A–F. Check the selected base. Numbers with a decimal point are not accepted; only integers are supported.
Can I convert negative numbers?
Yes. Put a minus sign in front and the sign is kept, as in −FF₁₆ = −255. Fixed-width two’s complement such as 8 bits is not produced; for that, convert 256 − 5 = 251 to get 1111 1011₂ (FB₁₆).
How do AND, OR and XOR work with negative numbers?
Negative numbers are treated as two’s complement with an endless run of 1s on the left. So −5 AND 3 = 3 and −1 XOR 5 = −6, and a note appears under the result.
Are very large numbers converted exactly?
Yes. There is no digit limit and integers are calculated exactly, so even the 20-digit 99999999999999999999 becomes 56BC75E2D630FFFFF in hex with no rounding.