Binary to Decimal, Hexadecimal and ASCII Converter
Convert between binary, decimal and hexadecimal numbers.
Binary - to Decimal, Hexadecimal and ASCII Converter
Click on the binary number buttons to toggle between 0 and 1 for each bit:
unsigned binary number (8 bits, one byte) | ||||||||
---|---|---|---|---|---|---|---|---|
2^{7} | 2^{6} | 2^{5} | 2^{4} | 2^{3} | 2^{2} | 2^{1} | 2^{0} | |
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
decimal number | 0 | |||||||
hexadecimal number | 0 | |||||||
ASCII |
A binary number is a number expressed in the binary numeral system or base 2 numeral system. A binary number can express any number by using only two digits: 0 and 1. The calculator above converts binary numbers with 1 to 8 bits (one byte) to the decimal or hexadecimal equivalents.
The default 8 bit (one byte) binary number 10100100 is calculated to the decimal equivalent:
10100100
= 1 2^{7} + 0 2^{6} + 1 2^{5} + 0 2^{4} + 0 2^{3} + 1 2^{2} + 0 2^{1} + 0 2^{0}
= 128 + 0 + 32 + 0 + 0 + 4 + 0 + 0
= 164
8 bits or byte can be used to represent an ASCII (American Standard Code for Information Interchange) alphabetic character - like the binary number 01000001, or decimal number 65, representing A.
Decimal - to Binary, Hexadecimal and ASCII Converter
decimal number | Load Calculator! |
---|---|
binary number | |
hexadecimal number | |
ASCII |
The standard numeral system is called decimal with base 10 and uses 10 symbols: 0,1,2,3,4,5,6,7,8,9.
Hexadecimal - to Binary, Decimal and ASCII Converter
hexadecimal number | Load Calculator! |
---|---|
binary number | |
decimal number | |
ASCII |
The hexadecimal (also base 16, or hex) is a positional numeral system with base 16.
The hexadecimal system use sixteen distinct symbols with 0–9 representing the values zero to nine and A, B, C, D, E, F (or a, b, c, d, e, f) representing the values ten to fifteen.
The default hexadecimal number a4 from the calculator above can be converted to its decimal equivalent:
a4
= a_{16} 16^{1} + 4_{16} 16^{0 }
= 10 16^{1} + 4 16^{0 }
= 160 + 4
= 164
The hexadecimal number a4 from the calculator above can be converted to its decimal equivalent:
a4b3
= a_{16} 16^{3} + 4_{16} 16^{2 }+ b_{16} 16^{1} + 3_{16} 16^{0 }
= 10 16^{3} + 4 16^{2} + 11 16^{1} + 3 16^{0 }
=40960 + 1024 + 176 + 3
Load Calculator!
= 42163
Hexadecimal vs. Decimal and Binary Numbers
For full table - rotate the screen!
Hexadecimal Number | |||||||||||||||
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a | b | c | d | e | f |
Decimal Number | |||||||||||||||
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Binary Number | |||||||||||||||
0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
Each hexadecimal digit represents four binary bits - a nibble. Four digital bits can represent up to 16 different values. Two nibbles with 8 bits is a byte. Computers use mostly bytes or multiplies of bytes (16, 32, 64 .. bits) in their operations.
Binary representation of the hexadecimal number
a4
= 1010 0100
Binary representation of the hexadecimal number
a4b3
= 1010 0100 1011 0011