## Base-n

Other examples of powers of 2 base numbers:

**Base-4 (Quarternary) Numbers**:

**In accordance with the above, the base-4 number system consists of 4 digits: 0, 1, 2 and 3.****Since a 2-bit number can only represent one of 0, 1, 2, or 3, any 2-bit number can be represented by a single base-4 number.****To convert a binary number to base-4, group the binary number**__from right to left__in groups of__2 bits__and represent their values in base-4**So, a binary number 1011 converts to base-4 as the following: 10**+ 11_{2}or 23_{2}_{4}**Only 2 digits are now required to represent any 4-bit number.**

**Base-8 (Octal) Numbers**:

**Base-8 (Octal) Numbers**:

**The base-8 number system consists of 8 digits: 0, 1, 2, 3, 4, 5, 6, and 7.****Since a 3-bit number can only represent one of 0, 1, 2, 3, 4, 5, 6, or 7, any 3-bit number can be represented by a single base-8 number.****To convert a binary number to octal, simply group the binary number**__from right to left__in groups of__3 bits__and represent their values in base-8

**So for example, a binary number 001011 converts to base-8 as the following: 001**+ 011_{2}or 13_{2}_{8}**Note that the two zeros in the 32s and 16s column are only place holders so even if the original binary number was 1011, the resulting base-8 value would be the same.****Only 2 digits are required to represent any 6-bit number.**

**Base-16 (Hexadecimal) Numbers**:

**Base-16 (Hexadecimal) Numbers**:

**Base-16 notation which has exactly 16 digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.**- Note: since values greater than 9 would require two digits to be represented in e.g. decimal 10, under this system such values are represented by a single alpha character, e.g., B
= 11_{16/Hex}_{10} - Typically in computing, hexadecimal (
*Hex,*for short) numbers are employed as a short hand for representing any 4 bit pattern using only a single character because there are exactly 16 possible 4-bit combinations.

Thus, any 4-bit number can be represented by a single base hex number.

- To convert a binary number to hexadecimal (hex), simply group the binary number
__from right to left__(from the least significant digit to the most significant) in groups of 4 bits and represent their values in base-16 - So, a binary number 1011 converts to base-16 as the following:

(1x8)+(0x4)+(1x2)+(1x1) or 8+2+1 or B

or 11_{16 or Hex}_{10}Therefore, only 2 hex digits are required to represent any 8-digit binary number.

****How many base-32 digits would be required to represent any 7-bit number?**