## FANDOM

1,702 Pages

In mathematics, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a to f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160) , or 10,995.

Each hexadecimal digit represents four binary digits (bits) (also called a "nibble"), and the primary use of hexadecimal notation is as a human-friendly representation of binary coded values in computing and digital electronics. For example, byte values can range from 0 to 255 (decimal) but may be more conveniently represented as two hexadecimal digits in the range 00 through FF. Hexadecimal is also commonly used to represent computer memory addresses.

## Hex-Dec Conversion

Convert a hexadecimal number into its decimal; multiply the decimal equivalent of each hexadecimal digit by the corresponding power of 16 and add the resulting values:

Example1: C0E716

1. C = (12 × 163) = (12 × 4096) =49,152

2. 0 = (0 × 162) = (0 × 256) = 0

3. E = (14 × 161) = (14 × 16) = 224

4. 7 = (7 × 160) = (7 × 1) = 7

C0E716 = (12 × 163) + (0 × 162) + (14 × 161) + (7 × 160) = (12 × 4096) + (0 × 256) + (14 × 16) + (7 × 1) = 49,38310

or

C0E716 = 49,152 + 0 + 224 + 7 = 49,38310

## Bin-Hex Conversion

Convert a binary number into its hexadecimal; divide into groups of four bits. If the number of bits isn't a multiple of four, simply insert extra 0 bits at the left (called padding).

Example1: 10100102 = 0101 0010 (grouped with padding) = 5216

Group1:

 8 4 2 1 0 0 1 0

Group2:

 8 4 2 1 0 1 0 1

0101 0010 = 5216

Example2: 110111012 = 1101 1101 grouped = DD16

## Hex-Bin Conversion

Convert a hexadecimal number into its binary; substitute the corresponding binary digits:

Example1: 0011 1010 = 3A16

Group1:

 8 4 2 1 0 0 1 1

Group2:

 8 4 2 1 1 0 1 0

Example2: 1110 01112