enddigit
Enddigit is a term used to denote the units digit of an integer in a given base, most often base 10. In decimal notation, the enddigit of an integer n is the digit in the ones place, equivalently the value |n| mod 10. In modular arithmetic, enddigit refers to the residue of n modulo 10.
Computing the enddigit is straightforward: take the absolute value of the number and reduce modulo 10. Many
Applications include quick arithmetic checks, pattern analysis of last digits of powers, and tasks where only
Examples: enddigit(1234) = 4; enddigit(-987) = 7. The units digit of powers also follows a cycle depending on
Generalization and related concepts: in any base b, enddigit(n) = n mod b, with the result in 0