OtherCalculators
9 calculators

Math Calculators

Free binary tools for converting between number bases, hex and text, for seeing how computers store signed integers and floating-point numbers, and for binary and bitwise arithmetic โ€” with the working shown and exact answers. No sign-up required.

Last updated: ยท Reviewed by Shakeel Alvi, OtherCalculators

Start here

Binary, octal, decimal and hexadecimal are the same numbers written in bases 2, 8, 10 and 16, so converting between them never changes a value โ€” 45 in decimal is 101101 in binary and 2D in hex. A computer stores a negative integer such as โˆ’5 as the two's complement pattern 11111011, and a fraction such as 0.1 as an IEEE 754 float that is slightly off. Every calculator here works exactly and shows its working; binary, hexadecimal and binary addition are part of England's GCSE computer science content.
Pick by the job

Which math calculator do you need?

Every tool runs on the same exact engine and can switch to the others from its tabs โ€” pick the one shaped like your question. The last row routes out of the category.

Available tools

Every math calculator in this category

9 calculators available
Reference table

The four common number bases

One value, 45, written in each base. The prefix column is how programming languages mark a number's base in code; every converter here accepts the prefixes as typed.

Binary, octal, decimal and hexadecimal compared: base, digits, code prefix and the number 45
Base nameBaseDigitsCode prefix45 written in it
Binary20, 10b101101
Octal80โ€“70o55
Decimal100โ€“9none45
Hexadecimal160โ€“9, Aโ€“F0x2D
Source: MDN Web Docs โ€” Lexical grammar: numeric literals โ€” prefixes as documented for JavaScript numeric literals; the values of 45 computed by the converters' engine
How they fit together

Five jobs, nine tools

Binary and decimal

2 tools

The two directions students are tested on, each with the method worked step by step.

Hex and text

2 tools

Bits read as hex digits four at a time, or as characters in UTF-8 and ASCII.

How computers store numbers

2 tools

Signed integers in two's complement and fractions in IEEE 754 floating point, bit by bit.

Binary arithmetic

2 tools

Adding, subtracting, multiplying and dividing in binary, and the AND, OR, XOR and shift operations.

Any base

1 tool

One number shown in binary, decimal, hex, octal and a base you choose, all editable at once.

Get it right

Common mistakes when converting number bases

  1. Reading repeated-division remainders top-down.The first remainder is the rightmost bit. Read the column from the last division upward, or the number comes out reversed.
  2. Grouping bits from the left when converting to hex.Hex and octal digits map onto groups of four and three bits counted from the right; pad the leftmost group with zeros.
  3. Trusting a spreadsheet past 15 or 16 digits.Floating-point tools round large whole numbers, so a 64-bit value can come back with the wrong last digits. Check big values with an exact converter.
  4. Treating a stored bit pattern as a plain number.In a computer, 11111011 in 8 bits is often โˆ’5 in two's complement, not 251. Know the format before you convert.
FAQ

Math calculator FAQs

Which converter should I use?

Use the binary converter when you need several bases at once, and the binary to decimal or decimal to binary converter when you need one direction with the working. For how a computer stores a value, use the two's complement calculator for signed integers and the IEEE 754 converter for floats; for characters, the binary to text converter. The binary and bitwise calculators do arithmetic and bit operations.

What is a number base?

A number base is how many different digits a system uses before it carries into the next place. Decimal is base 10, with digits 0 to 9. Binary is base 2, with only 0 and 1. Hexadecimal is base 16, using 0 to 9 and then A to F for ten to fifteen.

Why do computers use binary?

Digital circuits store and switch two states reliably โ€” on or off, high or low voltage โ€” and binary maps each bit onto one of those states. Hexadecimal and octal are not stored by the hardware; they are shorthand that people use to read binary more easily.

Are these converters exact for very large numbers?

Yes. They use arbitrary-precision integer arithmetic, so a 64-bit value such as 18,446,744,073,709,551,615 converts digit for digit. Tools built on ordinary JavaScript numbers are only exact up to 9,007,199,254,740,991 and round the last digits of bigger values.

Do these calculators handle fractions and negative numbers?

The base converters keep a minus sign as a sign. For the bit patterns a computer actually stores, the two's complement calculator encodes negative integers at 8 to 64 bits, and the IEEE 754 converter shows how a decimal fraction such as 0.1 is rounded into a 32-bit float or 64-bit double.

What this category covers

Everything here is about binary: writing numbers in different bases, reading bits as hex or text, the fixed-width patterns computers use for signed integers and floating-point numbers, and arithmetic and bit operations on them. Each tool shows its working, because in a classroom the method usually matters as much as the answer.

Not covered: half-precision and decimal floating-point formats, and text encodings other than UTF-8 and ASCII. For decimal arithmetic, trigonometry and logarithms, the scientific calculator is the right tool.

How these calculations work

Every number is held as an arbitrary-precision integer, parsed digit by digit and printed back in each base. Nothing passes through floating point, so a 64-bit value โ€” or a 4,000-bit one โ€” converts exactly, where ordinary JavaScript numbers lose digits past 2โตยณ.

The working uses the two textbook methods: positional expansion (each digit times its place value, summed) for converting to decimal, and repeated division by the base for converting from it. Conversion between binary, hexadecimal and decimal is listed in the DfE GCSE computer science content.

Related category

General Calculators ยท 6 tools โ†’

Where the scientific, rounding and proportion calculators live โ€” decimal arithmetic, rounding a converted value, and the everyday maths these number-system tools leave out.

Estimates & assumptions

  • Base conversions keep a minus sign as a sign; the two's complement and bitwise calculators work on fixed-width patterns of 8 to 64 bits.
  • Whole-number results are exact for inputs up to 4,096 characters, and the IEEE 754 converter prints the exact stored value. Step-by-step working is shown for numbers up to 64 bits.
  • Every calculation runs in your browser; nothing you type is sent to a server.

These calculators are for education and general calculation. Check values used in production code or hardware against your platform's documentation.