Hex to Binary Converter Online Tool
About Hex to Binary Converter Online Tool:
This online hex to binary converter tool helps you to convert one input hex number (base 16) into a binary number (base 2).
Hex Numeral System:
Hex numeral system (also called hexadecimal) has 16 digits, include (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
just like decimal numeral system, plus (a, b, e, d, e, f)
6 additional characters. Which
means it's is a number system of base 16. Since Hex numeral system can represent any binary string in a readable way, It is widely used in computer science. The SHA256 hash string is often appears as Hex style
string, the Color System used in HTML is also be written down as Hex number, from #000000
(pure black) to #FFFFFF
(pure white).
Binary Numeral System:
Binary numeral system has 2 digits, include (0, 1)
. Four binary digits can be represented by 1 hexadecimal digits, and three binary digits can be represented by one octal digits. Binary is the numeral
system that most close to electronic circuit hardware.
Hex to Binary conversion table:
Hex | Binary | Hex | Binary |
---|---|---|---|
1 | 1 | 20 | 101001 |
2 | 10 | 30 | 110000 |
3 | 11 | 40 | 1000000 |
4 | 100 | 50 | 1010000 |
5 | 101 | 60 | 1100000 |
6 | 110 | 70 | 1110000 |
7 | 111 | 80 | 10000000 |
8 | 1000 | 90 | 10010000 |
9 | 1001 | A0 | 10100000 |
A | 1010 | B0 | 10110000 |
B | 1011 | C0 | 11000000 |
C | 1100 | D0 | 11010000 |
D | 1101 | E0 | 11100000 |
E | 1110 | F0 | 11110000 |
F | 1111 | 100 | 100000000 |
10 | 10000 | 200 | 1000000000 |
11 | 10001 | 300 | 1100000000 |
12 | 10010 | 1000 | 1000000000000 |
13 | 10011 | 2000 | 10000000000000 |
14 | 10100 | 3000 | 11000000000000 |
More information:
Wikipedia (Hexadecimal): https://en.wikipedia.org/wiki/Hexadecimal
Wikipedia (Binary): https://en.wikipedia.org/wiki/Binary_number
Convert Hex to Binary with Python:
def hex_to_binary(hex_str): decimal_number = int(hex_str, 16) binary_number = bin(decimal_number) return binary_number hex_input = 'ccccccccc' binary_output = hex_to_binary(hex_input) print('binary result is:{0}'.format(binary_output)) ------------------- binary result is:0b110011001100110011001100110011001100
Convert Hex to Binary with Java:
public class NumberConvertManager { public static String hex_to_binary(String hex_input) { int decimal_int = Integer.parseInt(hex_input, 16); return Integer.toBinaryString(decimal_int); } public static void main(String[] args) { String hex_input = "f4"; String binary_output = hex_to_binary(hex_input); System.out.println("binary result is:" + binary_output); } } ------------------- binary result is:11110100