← All Tools

Binary/Hex/Decimal Calculator & ASCII Table

Convert between number bases with step-by-step explanations, or look up a character’s ASCII code.

All processing is 100% client-side. Your data never leaves your browser.

Input

Enter a decimal number (0-9). Spaces, underscores and thousands commas (1,000,000) are accepted.

Results

Type a number to see it in every base

Binary Arithmetic

How to use & examples
  1. Pick the input base (Decimal, Binary, Hex, Octal, or Other base for anything from 2 to 36).
  2. Type the number. Prefixes 0x / 0b / 0o, spaces and underscores are accepted as grouping and stripped automatically. Commas group digits too; in decimal only as thousands separators (1,000,000), so 3,14 is refused rather than read as 314.
  3. Results update as you type (or click Convert). A step-by-step explanation appears below for numbers up to 256 bits.
  4. For a signed interpretation, tick Signed integer (two's complement) and choose a bit width. A hex or binary pattern such as FF at 8 bits is also read as its signed value (−1).
  5. Use Binary Arithmetic for add / subtract / multiply / divide (exact, any size) and AND / OR / XOR / shifts (at the chosen bit width; each number must fit that width). >> keeps the sign like C, Java and Python; >>> fills with zeros.
CaseInput (base)Result
Good255 (decimal)Binary 1111 1111, Hex FF, Octal 377
Good (huge)FFFFFFFFFFFFFFFF (hex)Decimal 18 446 744 073 709 551 615 — exact, not rounded
Bad123 (binary)Rejected: “Invalid digit ‘2’ for binary” (never silently truncated)
Edge (negative)-1 (decimal), two's complement, 8-bitPattern 11111111 = 0xFF
Edge (overflow)128, two's complement, 8-bitReported: does not fit in 8-bit signed range [-128, 127]; as an 8-bit pattern 1000 0000 it reads as −128
Edge (shift)-8 >> 1, 8-bit-4 (arithmetic); -8 >>> 1 gives 124 (logical)

Accuracy & limits: all math uses arbitrary-precision integers (BigInt), so conversions are exact at any size — a 256-bit hex value converts to its exact decimal. Negative numbers use signed magnitude unless you enable two's complement at a chosen bit width. This tool handles integers only (no fractions). Only ASCII digits and letters count as digits: look-alikes such as ß or full-width digits are refused, never reinterpreted. Everything runs in your browser; nothing is sent anywhere.

Quick Reference

Binary (Base 2)

Digits: 0, 1

Prefix: 0b

Example: 0b1010 = 10

Used in: Computer hardware, digital logic

Octal (Base 8)

Digits: 0-7

Prefix: 0o or 0

Example: 0o12 = 10

Used in: Unix permissions, legacy systems

Decimal (Base 10)

Digits: 0-9

Prefix: none

Example: 10 = 10

Used in: Everyday numbers

Hexadecimal (Base 16)

Digits: 0-9, A-F

Prefix: 0x

Example: 0xA = 10

Used in: Colors, memory addresses, MAC

Common Values

Decimal Binary Hex Octal
0000000
1000111
81000810
101010A12
151111F17
16100001020
25511111111FF377
256100000000100400