Basics

Decimal (base-10)

8653   = (8 x 10^3) + (6 x 10^2) + (5 x 10^1) + (3 x 10^0)
212.11 = (2 x 10^2) + (1 x 10^1) + (2 x 10^0) + (1 x 10^-1) + (1 x 10^-2)

Binary (base-2)

Representing an ASCII string in binary
Each letter is represented by eight bits (because it's ASCII)
   L        o        o        k       space      o        u        t      !
--------------------------------------------------------------------------------   
01001100 01101111 01101111 01101011 00100000 01101111 01110101 01110100 00100001
 8-bit     8-bit    8-bit   8-bit     8-bit   8-bit    8-bit     8-bit   8-bit

Hexadecimal (base-16)

0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary    Hex Value   Decimal
-----------------------------------
0000      0           0
0001      1           1
0010      2           2
0011      3           3
0100      4           4
0101      5           5
0110      6           6
0111      7           7
1000      8           8
1001      9           9
1010      A           10
1011      B           11
1100      C           12
1101      D           13
1110      E           14
1111      F           15

Octal (base-8)

0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20   ...

Notation

For representing different numbering systems, a standard is to be followed in order to avoid confusion.

**Hexadecimal** 
1.  Place 0x before the hex numeral:  **0x33**
2.  Append a lowercase letter h after the numeral: **33h**
3.  Use the 16 subscript: **(33)_16**
4.  Specify base 16: **33 (base 16)**

---------------------------------------------------------

**Binary**
1. Place 0b before the binary: **0b1101**
2. Append a lowercase b at the end: 1000b
3. Use the 2 subscript: **(11)_2**
4. Specify the base beforehand: **10 (base 2)**

---------------------------------------------------------

Decimal
1. Place a 0d before the decimal: **0d112**
2. Mention base-10 in the subscript: **(112)_10**
3. Append a lowercase d after the decimal: **112d**
4. Specify the base beforehand: 10 (base 10)

Conversion b/w anything to decimal

The thinking behind it

The methods

<aside> 👉 Method 1

</aside>

We use the same method in Binary, only difference is the base.

Untitled

<aside> 👉 Method 2

</aside>