Binary System
A binary number is a number expressed in the base-2 numeral system, which uses only two symbols: 0 and 1. Each digit in a binary number is called a bit. bits can represent exactly numbers. Binary numbers are often prefixed with 0b to distinguish them from numbers in other bases.
To convert a number to base-:
- Group the bits into clusters of bits.
- Convert each bit to base-10, and then to base .
To reverse the conversion:
- Convert each digit of the base- number to decimal.
- Convert to binary and cluster each digit into bit clusters of size .
To convert a number from and to base-:
- Convert the number to base-10 and follow the steps for conversion.
Intuition
The following is an easy table that shows you how to convert from hexadecimal to binary: