Przejdź do treści
Number Buffet

Konwerter systemów liczbowych

Przelicz liczbę między dowolnymi dwiema podstawami od 2 do 36, z dokładną arytmetyką całkowitą i bez utraty precyzji.

3 min czytania

Ustawienia

Szybkie ustawienia

Spaces, underscores, commas and apostrophes are ignored, so 1010_1010 and 1,024 both work. Use a full stop for the radix point, and a leading minus for negatives.

A matching 0b, 0o or 0x prefix on the value is accepted and stripped.

How far to expand a fractional part. Many fractions never terminate in the target base — 0.1 in base 10 repeats forever in base 2 — so the expansion is cut here and flagged.

Affects the digits above 9 in bases 11 and up.

Only bases 2, 8 and 16 have a conventional prefix.

Binary in fours, hexadecimal in byte pairs, octal in threes, decimal in thousands.

Lists the same value in all 35 bases, ignoring the target base above.

Dopracuj wygląd

Najpierw wybierz styl obok obrazu — te suwaki go dostrajają.

Frame

A border drawn inside the edge of the image.

Zaawansowane

Wyniki

1 wartość

FF

255 in base 10 is FF in base 16.


Utwórz obraz

Włącz JavaScript, aby ostylować te liczby i pobrać je jako obraz. Same wartości są wypisane powyżej.

Text on the image

Drag a line straight onto the picture to place it — once placed, it stays exactly where you put it. Everything here is drawn into the download.

Artykuł z tłem historycznym poniżej nie został jeszcze przetłumaczony i jest wyświetlany po angielsku.

O konwerter systemów liczbowych

Positional notation — the idea that a digit's worth depends on where it sits — was not invented once. Sumerian and then Babylonian scribes wrote numbers in base 60 from roughly the third millennium BCE, using two cuneiform marks, a vertical wedge for one and a chevron for ten, repeated inside each sexagesimal place. For centuries there was no zero: a placeholder sign appears only in later tablets, and before that context alone told 2 from 120. Base 60 outlived the clay it was written on, in every clock face and protractor.

Mesoamerican scribes counted in twenties. Maya Long Count dates, inscribed from around the first century BCE, run 20, then 18 x 20 = 360 rather than 400 in the third place, a deliberate irregularity that brings that place near the length of a year. The Maya did write zero, as a shell glyph.

Binary's European history belongs to Gottfried Wilhelm Leibniz, who published Explication de l'Arithmétique Binaire in 1703. The popular story that the Chinese I Ching gave him the idea runs backwards: Leibniz had worked on base two for years beforehand, and when the Jesuit missionary Joachim Bouvet wrote to him about the 64 hexagrams in 1701, what the letters established was that the I Ching amounted to an independent, parallel invention of binary notation rather than Leibniz's source. Thomas Harriot had investigated binary and other positional systems earlier still, but published none of it; the work was found later among his papers.

Base twelve has had organised advocates: F. Emerson Andrews argued for it in New Numbers (1935), and the Duodecimal Society of America, founded in 1944, survives today as the Dozenal Society of America. Computing settled the argument on base 16 instead, for one reason: 16 is 2^4, so one hexadecimal digit is exactly four bits and two cover a byte. Writing the extra six digits as A through F became the de facto standard from 1966, in the wake of the Fortran IV manual for the IBM System/360.

Najważniejsze właściwości

  • In every base b, the digit string "10" means b itself and "100" means b squared.
  • Writing n in base b takes floor(log_b n) + 1 digits, so the smaller the base, the longer the numeral.
  • Base 36 is the largest base writable with the ten digits plus the twenty-six letters of the Latin alphabet, which is where this converter stops.
  • Because 8 = 2^3 and 16 = 2^4, converting between bases 2, 8 and 16 is pure digit grouping — no arithmetic is required.
  • A number is divisible by b - 1 exactly when the sum of its base-b digits is; casting out nines is this rule for b = 10.
  • 1/d in lowest terms terminates in base b only when every prime factor of d divides b, which is why 0.1 cannot be written exactly in binary.
  • Base 1 is not positional at all: with a single digit there is no place value, so unary can only repeat a mark.
  • This page converts with arbitrary-precision integers, so values far past 2^53 - 1 — the largest integer a JavaScript number holds exactly — still convert digit for digit.

Gdzie się pojawiają

  • Minutes, seconds and the 360 degrees of a circle are inherited directly from Babylonian base 60.
  • The Maya Long Count is base 20 with one deliberate irregularity: its third place counts 18 twenties, giving 360 days rather than 400.
  • URL shorteners and short-ID schemes encode database row numbers in base 36 or base 62 to keep links brief — a convention, not a standard.
  • Punycode, which carries internationalised domain names through ASCII-only systems, uses a 36-symbol digit alphabet (a-z for 0-25, then 0-9 for 26-35); it is widely described as base 36, but its generalised variable-length integers are not a plain positional base.
  • French quatre-vingts for 80 and the Danish counting words are often cited as traces of older base-20 systems; the Celtic-substrate explanation for the French forms is disputed among linguists.

Jak korzystać z tego generatora

Wygenerowane wartości są na górze, a obok nich przycisk kopiowania. Aby zrobić z nich obraz, wybierz wygląd spośród styli w sekcji Utwórz obraz, wskaż rozmiar eksportu i pobierz jako PNG, JPEG lub WebP. Wszystko renderuje się w przeglądarce, więc nic, co wygenerujesz, nie jest wysyłane na serwer.

Pasek adresu aktualizuje się w trakcie pracy, więc link zawsze odtwarza dokładnie to, co widzisz — przydaje się, gdy chcesz udostępnić konkretny ciąg albo zachować konfigurację na później. Użyj Kopiuj, aby zabrać wartości jako zwykły tekst, albo Eksportuj dane, aby otrzymać CSV, JSON, NDJSON, SQL lub XML.

Źródła

Streszczenia historyczne na tej stronie opierają się na wymienionych wyżej źródłach o otwartej licencji. Zauważyłeś błąd? Napisz nam, a go poprawimy.