Number Base Converter
Any base 2–36 · two's complement · IEEE 754 · bitwise
Enter a value and pick source and target bases — or switch tabs for two's complement and IEEE 754 representations, bitwise operations, or Unicode code points
Fractional conversions are truncated after a set number of digits because most decimal fractions do not terminate in binary — the classic example is 0.1, which repeats forever in base 2 and therefore cannot be stored exactly in any binary floating-point format, which is why comparing computed floats for exact equality is unreliable. The IEEE 754 view shows this directly: the stored value displayed alongside the bit pattern is what the hardware actually holds, and it often differs slightly from what was typed. Two's complement output depends entirely on the chosen width, so the same negative number produces a different bit pattern at 8, 16, 32 and 64 bits, and a value that fits in a wider type will overflow and wrap in a narrower one. Bitwise operations are performed at the selected width, and NOT in particular gives a very different result at 8 bits than at 32. Sixty-four-bit work uses arbitrary-precision integers internally to stay exact beyond the range where ordinary floating-point numbers lose whole-number accuracy.
Number Base Converter: Any Base, Two’s Complement, IEEE 754 and Bitwise, All in One Tool
Most base converters stop at binary, octal, decimal, and hex and skip fractional values entirely. This tool converts between any base from 2 to 36, using digits 0 through 9 followed by A through Z, and it handles fractional parts too, which is exactly where a lot of floating-point confusion actually comes from. Beyond plain conversion, it covers the representations that matter once you’re actually working with computer systems: two’s complement at a selectable bit width so you can see how negative numbers are really stored, a full IEEE 754 breakdown splitting a value into its sign, exponent and mantissa bits, bitwise operations at your chosen width and an ASCII/Unicode converter that maps characters to their code points, including characters beyond the basic multilingual plane like emoji.
How to Use
This tool has four tabs: Base Convert, Two’s Compl. / IEEE 754, Bitwise and ASCII / Unicode.
Step 1: Using Base Convert
- Type your number into the Value field. Fractional values are supported directly, for example
1010.101and digits above 9 use letters, A through Z, for bases above 10. - Set the From Base and To Base, anywhere from 2 to 36 each.
- For the five most common conversions, tap one of the Quick buttons instead of setting the bases manually: Dec→Bin, Dec→Hex, Bin→Dec, Hex→Dec, or Dec→Oct.
- Tap Convert to see the result. If the fractional part doesn’t terminate cleanly in your target base, which happens far more often than you’d expect, the tool shows it truncated to a set number of digits and flags this explicitly, since this exact behaviour is why a value like decimal 0.1 can never be stored exactly in binary.
Step 2: Using Two’s Complement / IEEE 754
- Switch to this tab and enter your Decimal Value, positive or negative.
- Select an Integer Bit Width, 8, 16, 32, or 64-bit, to see how that value is actually stored as two’s complement at that width.
- Select a Float Precision, 32-bit single or 64-bit double, to see the IEEE 754 breakdown, the sign bit, exponent bits and mantissa bits, laid out separately, along with the value actually stored in hardware, which can be subtly different from what you typed.
- Tap Convert to see both representations together.
Step 3: Using Bitwise
- Switch to the Bitwise tab and enter Operand A.
- Select the Operation, AND, OR, XOR, NOT, left shift or right shift. For NOT, only Operand A is used; for a shift, Operand B becomes the shift amount instead of a second value.
- Enter Operand B if your chosen operation needs it and select the Width, 8, 16, 32, or 64-bit, since the same operation can give a very different result depending on the width you’re working at.
- Tap Convert to see the bitwise result.
Step 4: Using ASCII / Unicode
- Switch to the ASCII / Unicode tab.
- Either type into the Text field to decode each character into its code point or enter a Code Point directly to convert it back into the actual character. You only need to fill one of the two fields.
- Tap Convert to see the code point in decimal, hex, and binary. Characters above 0xFFFF, like most emoji and several rare scripts, are handled correctly here too.
Step 5: Exporting your result
- Use Print / PDF for a clean printable copy, or Copy to paste the figures elsewhere.
Key Features
- Converts between any base from 2 to 36, not just the usual binary, octal, decimal and hex
- Fractional part conversion, showing directly why values like decimal 0.1 can’t be stored exactly in binary
- Two’s complement at selectable 8, 16, 32, or 64-bit width, backed by BigInt so 64-bit results stay exact
- Full IEEE 754 breakdown in single or double precision, splitting a value into sign, exponent and mantissa bits, alongside the value actually stored in hardware
- Bitwise calculator covering AND, OR, XOR, NOT and both shift directions at your selected width
- ASCII and Unicode converter mapping characters to code points in decimal, hex and binary, correctly handling characters beyond the basic multilingual plane
- Five one-tap quick conversion buttons for the most common base pairs
- Export as PDF or copy the result .
Formula / Logic Used
Base Conversion (Integer Part)
Converting decimal to a target base repeatedly divides by that base and reads the remainders from bottom to top, while converting the fractional part repeatedly multiplies the fraction by the base and reads off the resulting integer digits.
Two’s Complement
The same negative number produces a genuinely different bit pattern depending on the chosen width; a value that fits comfortably in a wider type will overflow and wrap around if forced into a narrower one.
IEEE 754 Structure
Single precision (binary32) uses 1 sign bit, 8 exponent bits and 23 mantissa bits, with a bias of 127. Double precision (binary64) uses 1 sign bit, 11 exponent bits and 52 mantissa bits, with a bias of 1023.
Bitwise Operations
Standard AND, OR, XOR, NOT and shift operations are applied bit by bit at your selected width, using BigInt internally so that 64-bit results stay exact even beyond the point where ordinary floating-point numbers lose whole-number precision.
Who Should Use This Tool
Diploma, B.Tech, and BCA/MCA students learning number systems, computer organisation, and digital logic who need to move between bases, check two’s complement by hand, or understand IEEE 754 storage. also useful for anyone debugging low-level code who needs a quick bitwise or representation check.
Frequently Asked Questions (FAQs)
Convert the integer part using the usual division method, then repeatedly multiply just the fractional part by 2 and read off the resulting integer digit each time. This tool does this automatically and flags clearly when the fractional part doesn’t terminate, which is exactly the case with decimal 0.1 in binary.
Two’s complement is calculated relative to the total bit width you’re working with, since the stored value equals 2 raised to that width plus the actual negative value. Widening or narrowing the bit width therefore changes every bit in the stored pattern, not just adds or removes leading zeros.
Most decimal fractions cannot be represented exactly by the sum-of-powers-of-two structure that IEEE 754 uses internally, so the hardware stores the closest value it actually can represent, which is often very slightly different from the number you typed. This tool shows that exact stored value alongside the bit pattern so the gap is visible rather than hidden.
Two’s complement is how computers store signed whole numbers, integers, with no fractional part, at a fixed bit width. IEEE 754 is a completely different scheme used specifically for storing numbers with fractional parts, using a sign bit, an exponent, and a mantissa instead of a simple bit-width wraparound.
Yes, the ASCII/Unicode converter correctly handles code points above 0xFFFF, which covers most emoji and several less common scripts, not just the basic multilingual plane that simpler ASCII tools are limited to.
Related Tools
- Big-O Complexity Reference & Estimator – for the algorithm analysis side of the same CS fundamentals
- Subnet Calculator (CIDR) – apply the binary skills from this tool directly to IP subnetting
- Regex Tester & Builder – another core CS tool for pattern-based text processing