संख्या आधार कनवर्टर

बाइनरी, ऑक्टल, दशमलव और हेक्साडेसिमल के बीच कनवर्ट करें।

आपका डेटा आपके डिवाइस से बाहर नहीं जाता
बाइनरी (बेस 2)
ऑक्टल (बेस 8)
दशमलव (बेस 10)
हेक्साडेसिमल (बेस 16)

संख्या आधार समझना

संख्या आधार (या रेडिक्स) निर्धारित करता है कि संख्याओं का प्रतिनिधित्व करने के लिए कितने अनूठे अंक सेवा करते हैं। सबसे परिचित बेस 10 (दशमलव) है।

अक्सर पूछे जाने वाले प्रश्न

क्या यह बहुत बड़ी संख्याओं का समर्थन करता है?

हाँ। यह टूल JavaScript BigInt का उपयोग करता है, जो बिना सटीकता के नुकसान के मनमाने ढंग से बड़े पूर्णांकों का समर्थन करता है।

कंप्यूटिंग में बाइनरी क्यों महत्वपूर्ण है?

कंप्यूटर दो-स्थिति विद्युत संकेत (चालू/बंद) का उपयोग करते हैं, जो स्वाभाविक रूप से बाइनरी (1/0) से मेल खाते हैं।

How positional notation works

A positional number system represents a number using a fixed-size set of digit symbols, where the position of each digit determines its weight. The weight of position i (counted from the right, starting at zero) is base^i. The number's value is the sum of digit × base^i across all positions. The string 352 in base 10 means 3×100 + 5×10 + 2×1 = 352. The string 1011 in base 2 means 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.

Positional notation is one of two big inventions in number representation. The other is non-positional (Roman numerals, Egyptian hieratic), where symbols have fixed values regardless of position. Positional systems compress; non-positional systems don't, the number 1,888 takes four digits in decimal but eight characters in Roman: MDCCCLXXXVIII.

A short history of bases

The Babylonians ran a positional base-60 (sexagesimal) system at least as early as the Old Babylonian period, around 1900–1600 BC. Cuneiform tablets from that era already use positional notation. Why 60? It has a uniquely high count of small divisors (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60), which made fraction arithmetic easier in a pre-decimal-fraction world. The Babylonian legacy is still in your pocket: time (60 seconds in a minute, 60 minutes in an hour) and angles / geographic coordinates (360 degrees in a circle, 60 minutes of arc per degree, 60 seconds of arc per minute) are direct descendants. When you read a clock or a latitude, you're reading sexagesimal.

The decimal positional system as we know it was developed by Indian mathematicians in the early centuries AD. The conceptual leap that distinguishes it from earlier counting boards is a written symbol for zero acting as a placeholder. The earliest unambiguous use of zero in a positional context is generally attributed to Brahmagupta (628 AD), whose treatise Brāhmasphuṭasiddhānta gave rules for arithmetic with zero. The Bakhshali manuscript shows even earlier use of a dot (bindu) as a placeholder.

The decimal system travelled from India to the Islamic world in the 8th–9th century, the Persian polymath al-Khwārizmī wrote On the Calculation with Hindu Numerals around 825 AD ("algorithm" and "algebra" are direct etymological descendants of his name and book titles). Europe lagged. Leonardo of Pisa, known as Fibonacci, formally introduced Hindu-Arabic numerals to Latin Europe in Liber Abaci (1202), demonstrating their superiority over Roman numerals. Roman numerals lingered in European bookkeeping into the 16th century.

Gottfried Wilhelm Leibniz described a fully binary number system in his 1703 paper Explication de l'arithmétique binaire: though his primary motivation was philosophical (correspondence with the I Ching) rather than practical. The leap to binary computing came with Claude Shannon's 1937 master's thesis at MIT, "A Symbolic Analysis of Relay and Switching Circuits," which showed Boolean algebra could model electrical relay networks, making binary the natural language of digital logic.

The conversion algorithms

Decimal to other base, repeated division. To convert a decimal integer N into base b, divide N by b, record the remainder, replace N with the quotient, and repeat until the quotient is 0. The remainders read bottom-to-top are the digits in base b. Worked example for 156 to binary: 156÷2 = 78 r0, 78÷2 = 39 r0, 39÷2 = 19 r1, 19÷2 = 9 r1, 9÷2 = 4 r1, 4÷2 = 2 r0, 2÷2 = 1 r0, 1÷2 = 0 r1, reading remainders bottom-up: 10011100. Verify: 128 + 16 + 8 + 4 = 156.

Other base to decimal, Horner's method. Start with 0; for each digit left-to-right, multiply the running total by the base and add the new digit. Worked example for hex 1F4: 0×16 + 1 = 1, then 1×16 + 15 = 31, then 31×16 + 4 = 500.

Both algorithms run in linear time relative to the number of digits, and JavaScript's BigInt implements them under the hood, which is why this tool has no precision ceiling. A 200-digit number converts cleanly between any two bases without rounding loss, the same way a calculator with arbitrary-precision integer arithmetic would.

The four bases that matter in computing

Powers of 2 worth memorising

PowerDecimalHexWhy it matters
2⁸2560x100One byte; max value of an 8-bit channel (RGB)
2¹⁰1,0240x400"1K" in computing context
2¹⁶65,5360x10000UTF-16 BMP size; 16-bit integer max
2²⁰1,048,5760x100000"1M" in computing context
2²⁴16,777,2160x100000024-bit RGB ("16.7M colors")
2³²~4.3 billion0x10000000032-bit unsigned integer max; IPv4 address space
2⁶⁴~1.8×10¹⁹0x100…64-bit integer max; well beyond floating-point precision

When you'd reach for a base converter

Other bases worth knowing

Source-code prefix conventions

Most modern languages use the same set of literal prefixes to disambiguate base in source code:

More questions

What about negative numbers?

Computers represent negative integers using two's complement: invert all the bits and add 1. So in 8-bit two's complement, −1 is 11111111 (0xFF), −5 is 11111011 (0xFB), and −128 is 10000000 (0x80). The most significant bit indicates the sign. This tool displays negative integers with a leading minus sign rather than a two's-complement representation, because the latter only makes sense at a fixed bit width, and since the tool uses arbitrary-precision BigInt, there's no fixed width to interpret against.

Why does hex use letters A–F?

Because base 16 needs 16 distinct digit symbols and the decimal digits 0–9 only provide ten. The convention of using A–F (case-insensitive) for 10–15 was popularised by IBM System/360 in the 1960s and standardised across the industry. Earlier systems experimented with other glyphs (Bendix's G-15 used u, v, w, x, y, z) but A–F won.

Can this tool handle fractions?

No, it's integer-only. Fractional base conversion is more complex because most decimal fractions don't have an exact representation in binary (the famous 0.1 + 0.2 ≠ 0.3 floating-point problem). For floating-point bit-level inspection, a dedicated IEEE 754 visualiser is the right tool.

Does anything get sent to a server?

No. The conversions run in your browser using JavaScript's native BigInt arithmetic. Nothing about your input leaves the page; the tool works offline once it's loaded.

संबंधित टूल