Small tools. Clear answers.

ƒ MATH · EIGHT CALCULATION MODES

Base-N Calculator

Convert integers between decimal, binary, octal and hexadecimal. Perform unsigned 32-bit AND, OR, XOR, NOT and shift operations. How to use it ↓

Base-N

Convert integers between decimal, binary, octal and hexadecimal. Perform unsigned 32-bit AND, OR, XOR, NOT and shift operations.

Conversions: signed integers up to 128 bits, shown with a minus sign. Bitwise operations: unsigned 32-bit operands; left shifts wrap to 32 bits.

READY · PRESS ENTER OR =
—

Enter an expression, then press Enter or =.

Memory empty · Calculations stay in this tab

History & notes 0

History

This session · Select a calculation to restore its inputs

A little room for your working.
Your calculations will appear here.

About this result

Results round to 12 significant digits. Exact arithmetic fractions are available where supported.

Expression reference

sin(30) · asin(0.5)
ln(e) · log(8,2)
root(27,3) · 2^3
5! · nCr(5,2)
sinh(1) · conj(3+4i)
re(3+4i) · arg(3+4i)
1e-5 · 200+10%

Use exp(x) for eˣ and mod(a,b) for the remainder. Roots and logarithms may return complex values.

START HERE

How to use the base-n calculator

  1. Choose the input base, then enter a valid integer in that base.
  2. Select Convert, or choose a bitwise operation.
  3. For AND, OR or XOR, enter a second integer in the same base. For shifts, enter the shift count in decimal.
  4. Select Calculate to view decimal, binary, octal and hexadecimal results.

Formula and method

Value = Σ digitₖ × baseᵏ; a hexadecimal digit F represents decimal 15

Integer base conversion

A positional numeral system weights digits by powers of its base. Binary uses digits 0–1, octal 0–7 and hexadecimal 0–9 plus A–F. Conversion keeps the integer value and changes its written form. This tool uses BigInt for conversion, so integers above the usual floating-point safe-integer limit can remain exact.

Bitwise operations and shifts

AND keeps bits set in both operands; OR keeps bits set in either; XOR keeps bits set in exactly one. NOT flips all 32 bits of an unsigned word. A left shift can discard high bits, and a right shift introduces zeros. Both results use unsigned 32-bit interpretation.

ONE TOOL, DIFFERENT TASKS

Choose the mode for your calculation

Scientific Calculator

Powers, roots, logarithms, trigonometry, factorials, combinations and permutations. Decimal and exact arithmetic fraction displays, Ans and memory.

Complex Number Calculator

Calculate with i. Read the rectangular result, magnitude, argument and conjugate. Angle units apply to the argument and trigonometric functions.

Matrix Calculator

Add, subtract and multiply matrices up to 4 × 4. Find a determinant, inverse or transpose. Matrix B is needed only for binary operations.

Numerical Calculus Calculator

Approximate a definite integral or a derivative at a real point. This is numerical calculus; it does not produce symbolic antiderivatives.

Equation Solver

Solve a quadratic, including complex roots, or a system of two or three simultaneous linear equations. Degenerate quadratic inputs are handled as linear equations.

Statistics Calculator

Find count, sum, mean, median, range endpoints, variance and standard deviation for up to 1,000 values. Choose sample or population statistics.

Base-N Calculator

Convert signed integers of up to 128 bits between binary, octal, decimal and hexadecimal. Bitwise operations use unsigned 32-bit operands.

Function Table Calculator

Evaluate a real-valued function over a range of x values. Choose start, end and step; each table supports up to 201 rows.

TRY IT YOURSELF

Base-N Calculator worked examples

Convert hexadecimal FF

FF in base 16

Decimal 255; binary 11111111; octal 377

F represents 15, so FF is 15×16+15=255.

Apply a bitwise AND

255 AND 15, decimal

15

The low four bits are set in both operands. Other bits are cleared by AND.

Shift an unsigned word left

4294967295 << 1

4294967294

Shifting the all-ones 32-bit word left discards its top bit and puts zero in the low bit.

READ THE RESULT WITH CONTEXT

Accuracy, notation and limits

Conversions accept signed integers whose magnitude is at most 2¹²⁸−1. Negative converted values use a minus sign rather than a two’s-complement encoding. Fractions and decimal points are not supported.

Bitwise inputs must be unsigned 32-bit integers from 0 through 4,294,967,295. Shift counts are decimal integers from 0 to 31. Left shifts wrap within the 32-bit word; this is different from unbounded integer multiplication by a power of two.

Read our calculation methodology ↗

COMMON QUESTIONS

Base-N Calculator FAQs

Does this support negative integers?

Yes for conversion. Negative values are shown with a minus sign in every base. Bitwise operations require nonnegative unsigned 32-bit inputs.

What base does the second operand use?

The second integer for AND, OR and XOR uses the selected input base. The shift count always uses decimal, regardless of the selected base.

Can I convert a fractional binary number?

No. This converter accepts integers only. Inputs containing a decimal point are rejected.

Calculation library: math.js. This page is an independent CalcPebble tool.