Aller au contenu
Number Buffet

Convertisseur de base

Convertissez un nombre entre deux bases quelconques de 2 à 36, en arithmétique entière exacte et sans perte de précision.

3 min de lecture

Réglages

Préréglages rapides

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.

Affiner l’apparence

Choisissez d’abord un préréglage à côté de l’image — ces réglages l’ajustent.

Frame

A border drawn inside the edge of the image.

Avancé

Résultats

1 valeur

FF

255 in base 10 is FF in base 16.


Créer une image

Activez JavaScript pour mettre en forme ces nombres et les télécharger en image. Les valeurs elles-mêmes sont listées ci-dessus.

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.

L’article de fond ci-dessous n’est pas encore traduit et s’affiche en anglais.

À propos des convertisseur de base

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.

Propriétés principales

  • 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.

Où on les rencontre

  • 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.

Comment utiliser ce générateur

Les valeurs générées apparaissent en haut, avec un bouton de copie à côté. Pour en faire une image, choisissez un style sous Créer une image, sélectionnez une taille d’export et téléchargez en PNG, JPEG ou WebP. Tout est rendu dans votre navigateur : rien de ce que vous générez n’est envoyé à un serveur.

La barre d’adresse se met à jour au fil de votre travail : le lien reproduit donc toujours exactement ce que vous voyez — pratique pour partager une suite précise ou conserver une configuration. Utilisez Copier pour récupérer les valeurs en texte brut, ou Exporter les données pour du CSV, JSON, NDJSON, SQL ou XML.

Sources

Les résumés historiques de cette page s’appuient sur les références en licence ouverte listées ci-dessus. Vous avez repéré une erreur ? Dites-le nous et nous la corrigerons.