Number Base Converter

Convert numbers between binary, decimal, octal, and hexadecimal, with a bitwise calculator.

Uses the value above as the first operand (A).

Binary: 00000010

Hex: 0x2

Found this useful? Share it

X LinkedIn Reddit WhatsApp

About Number Base Converter

This tool converts a number between the four bases developers use most often: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type a value into any field and the other three update automatically. It supports arbitrarily large integers using JavaScript's BigInt, so you're not limited by 32-bit or 64-bit overflow like some converters. Below the converter, a bitwise calculator runs AND, OR, XOR, NOT, and left/right shift operations against your current value, with results masked to a bit width you choose (8, 16, 32, or 64-bit) so NOT and shifts wrap correctly instead of showing a meaningless negative number.

Frequently Asked Questions

Hexadecimal (base 16) is widely used in programming to represent memory addresses, color codes, and byte values compactly, since each hex digit maps exactly to 4 bits.

Yes, the converter uses BigInt arithmetic internally, so it can accurately handle integers far larger than standard 32-bit or 64-bit limits.

The base converter itself is designed for unsigned (non-negative) integers. The bitwise calculator handles NOT and shift "wraparound" correctly by masking results to your chosen bit width, which is the standard way bitwise NOT is represented in a fixed-width system.

Bitwise NOT flips every bit, which is only meaningful within a fixed number of bits — NOT of 0 is 255 in 8-bit, but 4,294,967,295 in 32-bit. Choose the width that matches what you're working with (e.g. a byte, a 32-bit integer).