binary number
The base-two number system, using only the digits 0 and 1, in which computers store all data.
In more detail
Whole numbers convert to binary exactly, but most decimal fractions such as 0.1 become endless repeating binary fractions that must be cut short, which is where float rounding errors come from. bin(5) shows 0b101.
Related terms
- floating-point rounding error — The tiny inaccuracy in float results caused by storing decimal fractions in binary, such as 0.1 + 0.2 giving 0.30000000000000004.
- bytes, kilobytes, megabytes — Units of data size: a kilobyte is about a thousand bytes, a megabyte about a million, a gigabyte about a billion.
Taught in
- What A Program Really Is — Hands-on Python: Complete Video Course & Book
- Installing Python On Windows — Hands-on Python: Complete Video Course & Book
- Installing Python On A Mac — Hands-on Python: Complete Video Course & Book
- Floats, Division And Mixed Types — Hands-on Python: Complete Video Course & Book
- Literals, Names And Four Number Bases — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Operators And Who Binds First — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep