본문으로 이동
Number Buffet

2진수

정수 구간을 2진법으로 나열합니다. 0b 접두사, 네 자리씩 끊어 보기, 고정 비트 폭까지 0 채우기를 고를 수 있습니다.

OEIS A007088 · 3분 분량

설정

빠른 설정

The first value, in ordinary decimal. Counting continues with exact big integers even past 2^53 - 1.

Use 2 for even numbers, 16 to walk one nibble at a time.

0 means no padding. Set 8 for byte-width output; values too wide to fit are left unpadded.

Inserts a space every four bits, the way byte values are usually read.

Writes each line as "11 = 1011", which is what makes a conversion table.

모양 미세 조정

먼저 이미지 옆의 설정을 고르세요. 아래 조절기가 그것을 다듬습니다.

Frame

A border drawn inside the edge of the image.

고급

결과

16개 값

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111

16 values from 0 to 15, written in base 2.


이미지 만들기

이 숫자를 꾸며 이미지로 내려받으려면 자바스크립트를 켜세요. 값 자체는 위에 나열되어 있습니다.

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.

아래의 배경 설명은 아직 번역되지 않아 영어로 표시됩니다.

2진수 소개

Counting with two symbols is far older than the machines that made it unavoidable. Pingala's Chandahsastra, a Sanskrit treatise on poetic metre usually dated to the third or second century BCE, classified lines of verse by their patterns of short and long syllables, handling two-valued sequences systematically; later commentators pushed the scheme close to a binary numbering of metres. In 1605 Francis Bacon described a "biliteral" alphabet in which each letter became five places of two symbols — a five-bit code, built for concealment rather than calculation, and one he noted would work with any objects "capable of a twofold difference only". Thomas Harriot investigated binary along with several other positional systems, but published none of his results; they were found later among his papers.

The first widely read publication was Gottfried Wilhelm Leibniz's Explication de l'Arithmétique Binaire, in 1703. Leibniz had been working on base two well before that, which matters because the familiar story runs backwards: he did not take the idea from the I Ching. The Jesuit missionary Joachim Bouvet corresponded with him about the 64 hexagrams in 1701, and the letters established the I Ching as an independent, parallel invention of binary notation — Leibniz read it as an ancient tradition confirming an arithmetic he already possessed, and he liked the theology of a system that builds everything out of nothing and one.

Binary became a technology in two steps. George Boole's An Investigation of the Laws of Thought (1854) gave two-valued logic an algebra. Then Claude Shannon's 1937 master's thesis at MIT, A Symbolic Analysis of Relay and Switching Circuits, showed that Boole's algebra described exactly what networks of switches do — the hinge on which electronic computing turns. Konrad Zuse's Z3, finished in Berlin in 1941, already calculated in binary floating point, while the American ENIAC of 1945 was built as a decimal machine. The word "bit", a contraction of binary digit, was coined by John W. Tukey in a Bell Labs memo of 9 January 1947; Shannon put it into print the following year and credited Tukey for it.

주요 성질

  • A positive integer n needs floor(log2 n) + 1 binary digits, so 1,000,000 fits in 20 bits.
  • 2^k is a 1 followed by k zeros, and 2^k - 1 is a run of k ones.
  • The last binary digit is the parity: even numbers end in 0, odd numbers end in 1.
  • Doubling shifts every digit one place left; halving an even number shifts one place right.
  • n is a power of two exactly when n > 0 and n AND (n - 1) equals zero.
  • The count of 1s in a binary numeral is its Hamming weight, or popcount; for 2^k - 1 that count is k.
  • Eight bits give 2^8 = 256 distinct values: 0 to 255 unsigned, or -128 to 127 in two’s complement.
  • Every positive integer has exactly one binary representation without leading zeros.

등장하는 곳

  • Digital logic: processors, memory cells and bus lines all hold data as two voltage states, which is why computing settled on base 2 rather than the decimal design ENIAC used.
  • A Braille cell is six positions, each raised or flat — a 6-bit code with 64 patterns, devised by Louis Braille in the 1820s.
  • Unix file permissions such as chmod 755 are three groups of three bits (read, write, execute) written in octal.
  • IPv4 subnet masks and CIDR suffixes like /24 simply count the leading 1 bits of a 32-bit address.
  • The 64 hexagrams of the I Ching are six two-state lines apiece; reading them as the binary numbers 0 to 63 is a later interpretation, one Leibniz himself advanced, rather than part of the original text.

이 생성기 사용법

생성된 값은 위쪽에 표시되고 옆에 복사 단추가 있습니다. 이미지로 만들려면 이미지 만들기의 스타일에서 모양을 고르고, 내보내기 크기를 정한 뒤 PNG·JPEG·WebP로 내려받으세요. 모두 브라우저에서 그려지므로 생성한 내용이 서버로 전송되지 않습니다.

작업하는 동안 주소창이 갱신되므로, 링크는 항상 지금 보이는 상태를 그대로 재현합니다. 특정 수열을 공유하거나 설정을 저장해 두기에 좋습니다. 값을 일반 텍스트로 가져가려면 복사를, CSV·JSON·NDJSON·SQL·XML이 필요하면 데이터 내보내기를 사용하세요.

출처

이 페이지의 역사적 설명은 위에 나열한 공개 라이선스 자료를 바탕으로 합니다. 잘못된 내용을 발견하셨나요? 알려주시면 바로잡겠습니다.