Numeric std

 numeric_std  is a library package defined for VHDL. It provides arithmetic functions for vectors. Overrides of std_logic_vector are defined for signed and unsigned arithmetic. It defines numeric types and arithmetic functions for use with synthesis tools. Two numeric types are defined: UNSIGNED (represents UNSIGNED number in vector form) and SIGNED (represents a SIGNED number in vector form). The base element type is type STD_LOGIC. The leftmost bit is treated as the most significant bit. Signed vectors are represented in two's complement form. This package contains overloaded arithmetic operators on the SIGNED and UNSIGNED types. The package also contains useful type conversions functions.

It is typically included at the top of a design unit: The alternative numeric package ieee.std_logic_arith should not be used for new designs. This package does not provide overrides for mixing signed and unsigned functions. This package includes definitions for the following (not all of which are synthesizable):

sign changing operators

 * abs

arithmetic operators
Note: the second argument of /, rem, or mod must be nonzero.
 * rem
 * mod
 * rem
 * mod
 * rem
 * mod

shift and rotate functions

 * SHIFT_LEFT
 * SHIFT_RIGHT
 * ROTATE_LEFT
 * ROTATE_RIGHT
 * sll
 * srl
 * rol
 * ror

resize function
''Note: when increasing the size of a signed vector the leftmost bits are filled with the sign bit, while truncation retains the sign bit along with the (n-1) rightmost bits. For an unsigned vector, a size increase fills the leftmost bits with zero, while truncation retains n rightmost bits.''
 * RESIZE(v,n)

conversion functions
Note: The latter two functions each require a second argument specifying the length of the resulting vector.
 * TO_INTEGER
 * TO_UNSIGNED
 * TO_SIGNED

logical operators

 * not
 * and
 * or
 * nand
 * nor
 * xor
 * xnor

match function
''Note: compares argument vectors element by element, but treats any bit with the value '-' as matching any other STD_ULOGIC value. Returns false if any argument bit is 'U', 'X', 'W', or 'Z'.''
 * STD_MATCH

special translation function
''Note: 'H' is translated to '1' and 'L' is translated to '0'; this function takes an optional second argument XMAP, which can be any of the std_logic values, but defaults to '0'. Any value besides 01LH in the input argument results in all bits being set to XMAP, with a warning issued.''
 * TO_01