Primes, Factorials and Binary - Numbers Behind the Curtain

Prime number checker, factorial calculator and number system converter. Three math tools that connect textbook concepts to real-world programming and cryptography.

Natalia Skrzek · 11 June 2026 · 7 min read

The number 97 has exactly two divisors: 1 and itself. That makes it prime. Sounds like a trivia fact until you realize that RSA encryption - the thing protecting your bank login right now - works because multiplying two large primes is easy, but factoring the product back is practically impossible. Primes are not abstract. They are infrastructure.

Then there is the factorial. 10! = 3,628,800. Ten items, nearly four million arrangements. Card games, seating charts, password combinations - factorials show up wherever order matters. And the growth rate is brutal. 52! (the number of ways to shuffle a deck of cards) has 68 digits. More than atoms in the observable universe.

And binary. Every color on every website is a hexadecimal number that maps to three bytes of binary. Every Linux file permission is three octal digits. Every processor instruction is a string of zeros and ones. Number systems are not theory - they are the language machines speak.

Three calculators. Three concepts that connect high school math to things you use daily without thinking about the numbers behind them.


Is 97 prime? Check in two seconds

The Prime Number Calculator takes one input: a number. It returns three things - whether the number is prime, a full list of divisors, and optionally every prime from 2 up to your number.

Prime Number Calculator showing 97 is prime with 25 primes listed in range 2-97

Type 97 and the result is immediate: YES, divisors are 1 and 97, and there are 25 primes between 2 and 97. Try 561 and the calculator reveals it is composite: 3 x 11 x 17. Interesting because 561 is a Carmichael number - it fools some primality tests into thinking it is prime.

The calculator uses trial division up to the square root. Simple but correct for the range it handles. For numbers in the hundreds of digits, cryptographers use probabilistic tests like Miller-Rabin. But for homework, coding challenges and quick checks - trial division is more than enough.

NumberPrime?DivisorsWhy it matters
2Yes1, 2Only even prime
97Yes1, 9725th prime
100No1, 2, 4, 5, 10, 20, 25, 50, 100Highly composite
561No1, 3, 11, 17, 33, 51, 187, 561Smallest Carmichael number
997Yes1, 997Largest 3-digit prime

How fast does 10! grow?

The Factorial Calculator computes n! for any integer from 0 to 170. It shows the exact result, the expanded multiplication and scientific notation.

Factorial Calculator showing 10! = 3628800 with step-by-step expansion

10! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 = 3,628,800. That is how many ways you can seat 10 people around a table. Change one person's position and it counts as a new arrangement.

The numbers escalate fast. 20! already exceeds what a 64-bit integer can hold. 52! - the number of card deck shuffles - has 68 digits. 100! has 158 digits. 170! is the calculator's limit because JavaScript's floating point cannot represent 171! (it overflows to Infinity).

Where do factorials appear outside textbooks? Lottery odds use them: picking 6 from 49 means C(49,6) = 49!/(6! x 43!) = 13,983,816 combinations. Password strength calculations use them. DNA sequence analysis uses them. Statistical distributions - Poisson, binomial, multinomial - all have factorials in the formula.


255 in four number systems at once

The Number System Converter takes a number in any base - decimal, binary, octal or hexadecimal - and shows all four representations simultaneously.

Number System Converter showing decimal 255 as BIN 11111111, OCT 377, HEX FF

Type 255 in decimal and you get: binary 11111111, octal 377, hex FF. That FF is what you see in CSS colors (#FF0000 = pure red). The 377 is what chmod uses internally. The 11111111 is what the processor sees - eight bits, all on. One number, four faces.

Practical situations where this matters:

  • CSS colors: #FF5733 = rgb(255, 87, 51). Each hex pair is one byte, one color channel
  • chmod 755: octal 7 = binary 111 = rwx. Octal 5 = binary 101 = r-x. Three digits, nine permission bits
  • Memory addresses: 0x7FFF = 32767 decimal = max signed int16
  • ASCII codes: 'A' = 65 decimal = 41 hex = 1000001 binary
DECBINOCTHEXContext
0000NULL, false
12711111111777FMax signed byte
25511111111377FFMax byte, RGB channel
10241000000000020004001 KB
655351111111111111111177777FFFFMax uint16, TCP port range

Three concepts, one thread

Primes are the atoms of multiplication. Factorials count arrangements. Number systems translate between human-readable and machine-readable. They sound like separate topics until you start building things - then they overlap constantly.

RSA keys need primes. Combinatorial algorithms need factorials. Every debugger, network tool and color picker needs number system conversions. The calculators here do not replace understanding the math - but they give you a fast, reliable way to check your work or explore values you are curious about.


Tools discussed in this article

More Math tools


Check for a specific number