바이너리 (이진법)
0과 1만을 사용하는 밑이 2인 숫자 체계로, 모든 디지털 컴퓨팅의 기본 언어입니다.
10진수가 10의 거듭제곱을 나타내는 것과 달리, 이진법의 각 자리는 2의 거듭제곱(오른쪽부터 1, 2, 4, 8...)을 나타냅니다. 예를 들어, 1011은 (1×8) + (0×4) + (1×2) + (1×1) = 11입니다. 8개의 비트가 모여 1바이트를 구성합니다.
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살도 이해할 수 있게 설명
컴퓨터는 글자를 이해하지 못합니다. 단지 수십억 개의 아주 작은 스위치로 이루어져 있을 뿐이죠. 스위치는 켜지거나(1) 꺼질(0) 수만 있습니다. 이진법은 컴퓨터가 모든 것을 작동시키기 위해 사용하는 '켜짐/꺼짐' 신호의 긴 목록입니다.
🤓 Expert Deep Dive
ALU 수준에서 이진 연산은 부울 대수학(Boolean algebra)에서 파생된 논리 게이트를 사용합니다. 음의 정수는 2의 보수(Two's Complement)를 사용하여 표현하며, 부동 소수점은 IEEE 754 표준으로 인코딩됩니다. 메모리에 저장할 때 x86 아키텍처는 리틀 엔디안(Little-Endian) 방식을 사용합니다.
❓ 자주 묻는 질문
Why do computers use binary instead of decimal?
It's a physical limitation. It is much easier, cheaper, and reliable to build electrical switches that have only two clear states (ON/OFF or High/Low Voltage) rather than trying to accurately measure ten different voltage levels for a base-10 system.
What is the difference between a bit and a byte?
A 'bit' is a single binary digit (a single 0 or 1). A 'byte' is a group of 8 bits strung together. One byte is enough data to represent a single letter, like 'A' (which is 01000001 in binary).
How do you count in binary?
In decimal, you count 0 to 9 and then roll over to 10. In binary, you only have 0 and 1, so you roll over immediately. The counting goes: 0, 1, 10, 11, 100, 101, 110, 111 (which translates to 0, 1, 2, 3, 4, 5, 6, 7 in decimal).