Binary, Decimal, and Hexadecimal: How to Convert Number Bases
Learn how binary, decimal, and hexadecimal number systems represent integers, see conversion examples, and use a free programming number base converter.
Topics covered
- binary to decimal converter
- decimal to hexadecimal
- hexadecimal converter
- base 2 base 10 base 16
Quick navigation
Table of contents
What a number base means
A number base determines how many digit symbols are used and what each position is worth. Decimal, the base 10 system used in everyday arithmetic, uses digits 0 through 9. Binary is base 2 and uses 0 and 1. Hexadecimal is base 16 and uses 0 through 9 plus A through F for values ten through fifteen.
The same integer can be written differently in each system. A number base converter changes the representation, not the quantity itself. Programmers use binary and hexadecimal when working with bits, memory addresses, colors, and low-level data.
How positional notation works
Each digit is multiplied by a power of its base according to its position. In decimal, 255 means 2 hundreds + 5 tens + 5 ones. In hexadecimal, FF means 15 sixteens + 15 ones, which is 240 + 15 = 255.
Binary groups connect neatly to hexadecimal because one hexadecimal digit represents four binary bits. The hexadecimal value F is binary 1111, so FF becomes 11111111 in binary.
Worked conversion examples
Decimal 13 is binary 1101 because 8 + 4 + 1 = 13. It is hexadecimal D, since D represents decimal 13. Decimal 255 is binary 11111111 and hexadecimal FF.
Use the Numveta Number Base Converter by entering a whole number and selecting its input base: 2, 10, or 16. The result shows the equivalent binary, decimal, and hexadecimal representations together.
Check the input base and limits
A base-2 input can contain only 0 and 1. A decimal input uses the digits 0 through 9, and hexadecimal may also contain A through F. If a digit is not valid for the selected base, the conversion cannot be interpreted as intended.
This browser calculator supports whole integers within JavaScript’s safe integer range. It does not convert fractions, arbitrary precision big integers, or text encodings. For larger values, use a tool that explicitly supports arbitrary precision and verify how it handles signed input.
FAQ
What is 255 in binary and hexadecimal?
Decimal 255 is binary 11111111 and hexadecimal FF.
Why does hexadecimal use letters?
Base 16 needs sixteen digit symbols. The letters A through F represent the values ten through fifteen.
Can I convert fractional values with this tool?
No. This converter is for whole integers in base 2, 10, or 16.
