Enter a number in the Converter tab to see its breakdown.
Bit Pattern
—
Decimal 0–255 Quick Reference
Dec
Bin
Oct
Hex
ASCII Printable Characters (32–126)
Dec
Hex
Char
Common Hex Colors
Formulas & Methods
Pad Len
Math.ceil(binStr.length / 4) * 4
Max Unsigned
Math.pow(2, bits) - 1
Max Signed
Math.pow(2, bits - 1) - 1
Key Terms
Input BaseAn input parameter used in number base calculations. Adjust this value to see how it affects your results.
Custom Base (2–36)An input parameter used in number base calculations. Adjust this value to see how it affects your results.
Number to ConvertAn input parameter used in number base calculations. Adjust this value to see how it affects your results.
Show Two's Complement forAn input parameter used in number base calculations. Adjust this value to see how it affects your results.
Operand AAn input parameter used in number base calculations. Adjust this value to see how it affects your results.
Operand BAn input parameter used in number base calculations. Adjust this value to see how it affects your results.
Real-World Examples
JA
Jamie
College sophomore working through a problem set
Input Base
12
Custom Base (2–36)
24
Number to Convert
36
Show Two's Complement for
48
Solved example
Result: 42
Try entering Jamie's values above to see the detailed breakdown.
PA
Prof. Adams
Physics teacher preparing examples for class
Input Base
8
Custom Base (2–36)
16
Number to Convert
28
Show Two's Complement for
40
Solved example
Result: 84
Try entering Prof. Adams's values above to see the detailed breakdown.
Understanding Number Base
What Is Number Base?
Number Base is a fundamental concept that this calculator helps you understand and apply. Whether you're a beginner or experienced professional, having precise calculations at your fingertips saves time and reduces errors.
Why It Matters
Understanding number base helps you make informed decisions backed by data rather than guesswork. Small miscalculations can compound into significant errors, making accurate tools essential for planning and analysis.
How It Works
The Number Base Converter applies established formulas and methodologies to your specific inputs. Results update in real-time, letting you experiment with different scenarios to find the optimal approach for your situation.
Tips & Best Practices
Start with realistic values — use actual data when available rather than rough estimates for more meaningful results.
Compare scenarios — try different input combinations to understand how each variable affects the outcome.
Save your work — use the Share button to bookmark specific calculations for future reference.
Consult professionals — for critical decisions, use calculator results as a starting point and verify with a qualified expert.
❓
Frequently Asked Questions
Basics What is a number base (radix)?
A number base (or radix) defines how many unique digits are used in a positional numeral system. Base 10 (decimal) uses 0–9. Base 2 (binary) uses only 0 and 1. Base 16 (hexadecimal) uses 0–9 plus A–F.
Method How does binary work?
Binary uses only 0 and 1. Each digit (bit) represents a power of 2. The rightmost bit is 2⁰=1, next is 2¹=2, then 2²=4, etc. Binary 1010 = (1×8) + (0×4) + (1×2) + (0×1) = 10 in decimal.
General Why is hexadecimal used in computing?
Hex is compact — one hex digit represents exactly 4 bits (a nibble). Two hex digits represent a full byte. It is much easier to read and write memory addresses, color codes (#FF5733), and machine code in hex than binary.
Basics What is two's complement?
Two's complement is how computers represent negative integers. To negate a number: flip all bits (one's complement) then add 1. In 8-bit: +5 = 00000101, −5 = 11111010 + 1 = 11111011. This makes addition and subtraction use the same hardware circuit.
Method How do you convert decimal to binary?
Divide the number by 2 repeatedly and record the remainders from bottom to top. Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1 → read remainders up: 1101.
Basics What is octal and where is it used?
Octal (base 8) uses digits 0–7. It was used in early computing because 3 bits map to one octal digit. Today it appears in Unix/Linux file permissions (chmod 755 means rwxr-xr-x — each digit is 3 permission bits).
General How are hex color codes structured?
#RRGGBB format: each pair of hex digits represents red, green, blue intensity from 00 (0) to FF (255). #FF0000 = pure red, #00FF00 = pure green, #0000FF = pure blue, #FFFFFF = white, #000000 = black.
General What does IEEE 754 floating point mean?
IEEE 754 is the standard for representing decimal fractions in binary. A 32-bit float has 1 sign bit, 8 exponent bits, and 23 mantissa bits. It can represent approximately 7 significant decimal digits. Example: 3.14 in binary IEEE 754 is 0 10000000 10010001111010111000011.
General Can any base be used?
Yes. Bases 2 through 36 are supported (using digits 0–9 and letters A–Z). Base 36 (alphanumeric) is used for URL shorteners. Base 60 (sexagesimal) is used for time (60 seconds/minutes) and angles (360°).
Basics What is the maximum safe integer in JavaScript?
JavaScript's Number.MAX_SAFE_INTEGER is 2⁵³ − 1 = 9,007,199,254,740,991. Beyond this, integer precision is lost. For larger numbers, BigInt must be used. This calculator handles values up to MAX_SAFE_INTEGER accurately.
Method How do you convert between bases without going through decimal?
The most practical approach is to convert to decimal as an intermediate step. However, binary and hex have a shortcut: since 16 = 2⁴, each hex digit maps directly to exactly 4 binary digits. Similarly, octal digits map to 3 binary digits each.
Basics What is a nibble and a byte?
A nibble is 4 bits (one hex digit, values 0–15). A byte is 8 bits (two hex digits, values 0–255). A word is typically 16 bits (4 hex digits, 0–65535). These are fundamental units in computer architecture.
General Why do programmers count from zero?
Zero-based indexing aligns with binary addressing. The first address is 0 (all bits zero). An array of N elements occupies addresses 0 through N−1, allowing the size calculation as last − first = N−1 − 0 + 1 = N, consistent with binary arithmetic.
Basics What is BCD (Binary Coded Decimal)?
BCD encodes each decimal digit separately as 4 bits. The decimal number 59 in BCD is 0101 1001 (5 = 0101, 9 = 1001). BCD is used in financial applications and digital displays where exact decimal representation is needed without floating-point rounding.
General How are negative numbers represented in binary?
Three main methods exist: sign-magnitude (leftmost bit = sign), one's complement (flip all bits), and two's complement (flip all bits + 1). Modern computers universally use two's complement because it avoids having two representations of zero and simplifies arithmetic circuits.
Operands
Used for AND · OR · XOR
Results
OperationDescBinaryHexDec
Enter values above to see bitwise results.
A & BA | BA ^ B~AA << 1A >>> 1
How to Use the Number Base Converter
1
Enter Your Details
Fill in the input fields with your data — input base, custom base (2–36), number to convert, and show two's complement for. The calculator updates results instantly as you type, so there's no submit button to press.
2
Adjust Options & Presets
Fine-tune your calculation by adjusting any optional settings, presets, or advanced parameters. Try different values to compare scenarios and understand how each variable affects the outcome.
3
Review & Share Results
Read your results in the output panel. Use the Share button to generate a link with your inputs pre-filled, or copy results to your clipboard. All calculations happen locally in your browser — your data is never sent to a server.