Binary number converted to binary, whereupon the first converted piece is multiplied by 10 and added to the second converted piece, where "k" is the number of decimal digits in the second, least-significant piece before conversion. Binary may be converted to and from hexadecimal more easily. This is because the radix of the hexadecimal system (16) is a power of the radix of the binary system (2). More specifically, 16 = 2, so it takes four digits of binary to represent one digit of hexadecimal, as shown in the adjacent table. To convert a hexadecimal number into its binary equivalent, simply substitute
Computer number format sixteen values, a nibble is sometimes known as a hexadecimal digit. Octal and hex are convenient ways to represent binary numbers, as used by computers. Computer engineers often need to write out binary quantities, but in practice writing out a binary number such as 1001001101010001 is tedious and prone to errors. Therefore, binary quantities are written in a base-8, or "octal", or, much more commonly, a base-16, "hexadecimal" or "hex", number format. In the decimal system, there are 10 digits, 0 through 9, which combine to form numbers. In an octal system, there are only 8 digits, 0 through 7.