本文へスキップ
Number Buffet

基数変換ツール

2 から 36 までの任意の基数のあいだで数を変換します。多倍長整数演算なので精度が失われることはありません。

読了 3 分

設定

クイックプリセット

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.

見た目を微調整

まず画像の横にあるプリセットを選んでください。ここで細かく調整します。

Frame

A border drawn inside the edge of the image.

詳細設定

結果

1 件の値

FF

255 in base 10 is FF in base 16.


画像を作成

これらの数字を装飾して画像としてダウンロードするには JavaScript を有効にしてください。値そのものは上に一覧表示されています。

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.

以下の解説記事はまだ翻訳されておらず、英語で表示されます。

基数変換ツールについて

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.

主な性質

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

登場する場面

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

このジェネレーターの使い方

生成された値は上部に表示され、横にコピーボタンがあります。画像にするには 画像を作成 のスタイルから見た目を選び、書き出しサイズを指定して PNG・JPEG・WebP でダウンロードしてください。すべてブラウザー内で描画されるため、生成した内容がサーバーに送られることはありません。

操作に合わせてアドレスバーが更新されるので、リンクは常に表示どおりの状態を再現します。特定の数列を共有したり、設定を保存しておくのに便利です。値をプレーンテキストで取り出すには コピー、CSV・JSON・NDJSON・SQL・XML が必要なら データを書き出す を使ってください。

出典

このページの歴史的な記述は、上に挙げたオープンライセンスの資料に基づいています。誤りを見つけたら お知らせください。修正します。