TeXipedia

bmod

Represents the binary modulo operation, displaying division remainders with proper mathematical spacing.

Overview

Serves as a binary operator in number theory and computer science contexts, providing correct mathematical spacing around the modulo operation.

  • Essential for expressing congruence relations and modular arithmetic.
  • Preferred over the basic mod operator when writing formal mathematical expressions.
  • Commonly used in cryptography, discrete mathematics, and algorithmic problems.
  • Automatically adds appropriate spacing before and after the operator, unlike the basic \mod command.

Examples

Expressing a congruence relation in modular arithmetic.

x3mod7x \equiv 3 \bmod 7
x \equiv 3 \bmod 7

Computing remainders in a number theory equation.

15mod4=315 \bmod 4 = 3
15 \bmod 4 = 3

Showing periodic behavior in a mathematical sequence.

f(n)=nmod12f(n) = n \bmod 12
f(n) = n \bmod 12