Binary

Base-2 system with only 0 and 1—computer's native language.

Binary is a positional numeral system with a radix (base) of 2. It uses only two digits: 0 and 1, called bits (binary digits). Every digital computer operates on binary because electronic circuits have two stable states: on (1) and off (0).

Position values (right to left): 1, 2, 4, 8, 16, 32...
Example: 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀

8 bits = 1 byte, representing values 0-255 (unsigned) or -128 to 127 (signed, two's complement).

        graph LR
  Center["Binary"]:::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;

      

🧠 Knowledge Check

1 / 5

🧒 Explain Like I'm 5

Computers don't understand letters or words; they only understand 'on' and 'off'. Binary is the list of 'on/off' signals that make everything work.

🤓 Expert Deep Dive

Two's complement represents negative integers (invert bits, add 1). IEEE 754 encodes floating-point with sign, exponent, and mantissa bits. Bitwise operations (AND, OR, XOR, shifts) enable efficient low-level manipulation. Binary-coded decimal (BCD) encodes each decimal digit in 4 bits.

📚 Sources