Binary Number System
The binary system uses base 2, with digits 0 and 1 only. Computers store and process all data in binary because electronic circuits naturally represent two states: on and off.
Base-2 Place Value
Each position in a binary number represents a power of 2, starting from 2⁰ on the right. A digit 1 in a position adds that power; 0 adds nothing.
For example, 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.
Converting Between Binary and Decimal
To convert binary to decimal, multiply each bit by its place value and sum. To convert decimal to binary, repeatedly divide by 2 and record remainders from bottom to top.
For 13: 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1 → 1101₂.
Binary in Computing
Bits (binary digits) are grouped into bytes (8 bits), allowing values 0–255. Binary arithmetic uses the same addition rules as decimal, with carrying when a column sums to 2 or more.
Logical operations (AND, OR, NOT, XOR) operate directly on binary bits and underpin all digital computation.
Examples
- 1111₂ = 15 in decimal.
- 10000₂ = 16 in decimal (2⁴).
- The decimal number 5 is written 101 in binary.
FAQ
Why do computers use binary?
Electronic switches reliably represent two states (high/low voltage). Binary maps directly to these states, making hardware design simpler and more reliable than higher bases.
What is a bit?
A bit is one binary digit, either 0 or 1. Eight bits form a byte. Data sizes (KB, MB, GB) count bytes, each holding 8 binary digits.