# Convert binary to hex

Please provide values below to convert binary to hexadecimal, or *vice versa*.

### Binary

**Definition:** The binary numeral system is a base-2 numeral system that typically only uses two symbols: 0 and 1. Thus, it has a radix, or a base number of unique digits of two. Each digit in binary is referred to as a bit.

It is a system that uses positional notation in which the same symbol is used for different orders of magnitude, where each "place" represents a different value dependent on whichever base is being used; in the case of binary, the base is 2.

In the binary number 101, the first "1" on the left is in the 2^{2} place, the "0" is in the 2^{1} place, and the second "1" is in the 2^{0} place. If this were converted to decimal:

101 = 1 × 2^{2} + 0 × 2^{1} + 1 × 2^{0} = 4 + 0 + 1 = 5

**History/origin:** There is evidence of systems related to binary numbers in a number of different cultures including that of ancient Egypt, China, and India. However, the modern binary number system was studied and developed by Thomas Harriot, Juan Caramuel y Lobkowitz, and Gottfried Leibniz in the 16th and 17th centuries.

**Current use:** The binary system is widely used in almost all modern computers or computer-based devices. Because of this, it is sometimes referred to as the "language of computers." Its widespread use can be attributed to the ease with which it can be implemented in a compact, reliable manner using 0s and 1s to represent states such as on or off, open or closed, etc.

### Hexadecimal

**Definition:** The hexadecimal numeral system is a base-16 positional numeral system that uses the same symbols as the decimal system to represent the values of zero to nine (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) and the letters A, B, C, D, E, and F to represent the values of ten to fifteen. Being a positional numeral system means that each position represents a different magnitude. For example, using the hex number AAA:

AAA = 10 × 16^{2} + 10 × 16^{1} + 10 × 16^{0} = 2560 + 160 + 10 = 2730

As can be seen, although the symbols occupying the three positions shown are the same, "A," the magnitude of each is one power of 16 apart.

**History/origin:** The term hexadecimal is derived from the prefix "hexa" from Greek for "six" and "decimal," which is derived from the Latin meaning "tenth." The symbols A-F were not always used for the values 10 through 15 in the earlier instances of the hexadecimal system. In the 1950s, some used the digits 0 through 5 with a bar over each value, while others used the letters u through z. Yet others used K, S, N, J, F, and L or even F, G, J, K, Q, and W.

As can be seen, there were many different ways in which the values of 10 through 15 were represented in the past, showing the fairly arbitrary nature of symbol choice. Both capital A-F as well as lower case a-f are used today to represent these symbols.

**Current use:** The hexadecimal numeral system is widely used throughout computer system design and programming. This is partly due to it being easier for humans to read hexadecimal values than it is for them to read binary-coded values.