이진법

0과 1만 사용하는 기수-2 시스템—컴퓨터의 모국어.

이진법은 기수가 2인 위치 기수법입니다. 0과 1이라는 두 자릿수만 사용하며, 이를 비트라고 합니다. 모든 디지털 컴퓨터는 이진법으로 작동합니다. 전자 회로에는 켜짐(1)과 꺼짐(0)의 두 가지 안정 상태가 있기 때문입니다.

자릿값(오른쪽에서 왼쪽으로): 1, 2, 4, 8, 16, 32...
예: 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀

8비트 = 1바이트, 0-255 값을 나타냅니다.

        graph LR
  Center["이진법"]:::main
  Rel_bit["bit"]:::related -.-> Center
  click Rel_bit "/terms/bit"
  Rel_byte["byte"]:::related -.-> Center
  click Rel_byte "/terms/byte"
  Rel_hexadecimal["hexadecimal"]:::related -.-> Center
  click Rel_hexadecimal "/terms/hexadecimal"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 5살도 이해할 수 있게 설명

세는 데 손가락이 두 개뿐이라고 상상해 보세요. 0, 1, 그다음 10, 11, 100으로 셀 겁니다... 컴퓨터가 이렇게 셉니다! '꺼짐'(0)과 '켜짐'(1)만 이해합니다.

🤓 Expert Deep Dive

2의 보수는 음의 정수를 나타냅니다(비트 반전 후 1 더하기). IEEE 754는 부호, 지수, 가수로 부동 소수점을 인코딩합니다. 비트 연산(AND, OR, XOR, 시프트)을 통해 효율적인 저수준 조작이 가능합니다.

📚 출처