Convert between Binary, Decimal, Hexadecimal, Octal, BCD, and Gray Code instantly. Also convert ASCII text to
binary and back.
Base 10 Enter Decimal Number
Please enter a valid decimal number (0-9).
π Step-by-step conversion
Base 2 Enter Binary Number
Please enter a valid binary number (0s and 1s only).
π Step-by-step conversion
Base 16 Enter Hexadecimal Number
Please enter a valid hex number (0-9, A-F).
Base 8 Enter Octal Number
Please enter a valid octal number (0-7 only).
π Text / ASCII β Binary
π’ Binary β Text / ASCII
Binary Output
β
Text Output
β
Number
Systems β Conversion Table (0-15)
Decimal
Binary
Octal
Hex
BCD
Gray Code
Frequently Asked Questions
How do I convert binary to decimal?
To convert binary to decimal, multiply each binary digit by 2 raised to the power of its
position (from right, starting at 0), then sum all values. Example: 1010 = 1Γ2Β³ + 0Γ2Β² + 1Γ2ΒΉ + 0Γ2β° = 8+0+2+0
= 10. Use the step-by-step button to see this for any number.
What is hexadecimal (hex)?
Hexadecimal is a base-16 number system using digits 0-9 and letters A-F. It is widely used in
computer science, web colors (#FF5733), memory addresses, and color codes. One hex digit represents exactly 4
binary bits.
What is Gray Code?
Gray Code (also called reflected binary code) is a binary sequence where only one bit changes
between consecutive values. It is used in digital circuits, rotary encoders, and error correction to prevent
glitches during transitions.
What is BCD (Binary Coded Decimal)?
BCD represents each decimal digit with its 4-bit binary equivalent. For example, decimal 25
in BCD is 0010 0101 (2=0010, 5=0101). It is used in digital clocks, calculators, and financial systems where
decimal accuracy is critical.
How do I convert text to binary?
Each character has an ASCII value (e.g., 'A' = 65, 'a' = 97). To convert to binary, find the
ASCII value of each character and convert it to 8-bit binary. Use the "Text β Binary" tab above to convert any
text to binary and back.
What is the difference between Octal and Binary?
Binary (Base 2) uses only 0 and 1. Octal (Base 8) uses digits 0-7. One octal digit represents
exactly 3 binary bits. Octal was historically used in older computer systems and Unix file permissions (e.g.,
chmod 755).