Binary Converter - Decimal, Hex, Octal

Your details

The base of the number you are entering.
Type the number to convert. Binary accepts 0 and 1 only, hex accepts 0-9 and A-F.
Unsigned numbers are always non-negative. Signed uses two's complement to represent negatives.
Determines the range of representable values and how many binary digits are shown.
Decimal
42

Base 10 representation

Binary0010 1010
Hexadecimal2A
Octal52
Set bits (ones)3 of 8
Bytes1 byte

42 decimal = 0x2A hex = 0o52 octal

  • In hexadecimal: 0x2A - used in HTML color codes, memory addresses, and low-level programming.
  • This number has 3 set bits out of 8, a 38% bit density (called the Hamming weight or popcount).

Next stepUse the hex output to look up color values (#RRGGBB), memory offsets, or CPU registers. Octal is common in Unix file permissions (chmod 755 means 111 101 101 in binary).

= Powered by OnlyCalculators