# Binary Number System

> A way of writing numbers with only 0 and 1. Computers use it inside.

**Field:** General Knowledge  
**Category:** Math & Statistics  
**Also known as:** Binary, Base 2, Base-2, Binary Number

## Think of it like

Think of it like a row of light switches. Each one is either off or on.

## Definition

The binary system writes every number using only two digits, 0 and 1. Each place is worth twice the place to its right: 1, 2, 4, 8 and so on. So 101 in binary means one 4, no 2s and one 1, which is 5. Computers use binary because a wire is either off or on. Each 0 or 1 is called a bit.

## Example

Emma writes 5 in binary as 101: one 4, no 2 and one 1. In Python, bin(5) gives the same answer.

## Example code

```python
>>> bin(5)
'0b101'
>>> int('101', 2)
5
```

Five turned into binary, and binary 101 turned back into five.

## Why it matters

All that a computer stores, from text to photos, is binary deep down.

## Common mistake

Reading 10 in binary as ten. In binary, 10 means two.

## Three principles

- **Two digits.** Only 0 and 1.
- **Each place doubles.** 1, 2, 4, 8 and on.
- **Off or on.** Why computers use it.

## Related terms

- [Decimal Number System](https://learn.benibix.com/term/general/decimal-number)
- [Hexadecimal](https://learn.benibix.com/term/general/hexadecimal)
- [Byte](https://learn.benibix.com/term/development/byte)

---

Source: https://learn.benibix.com/term/general/binary-number
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
