sxtd
sxtd(x_numberx_bits) =>x_result
Description
Sign-extends the number represented by the rightmost specified number of bits in the given integer.
Sign-extends the rightmost x_bits bits of x_number. That is, sign-extends the bit field x_number<x_bits - 1:0> with x_number<x_bits - 1> as the sign bit.
Arguments
Value Returned
Examples
sxtd( 7 4 )
=> 7
sxtd( 8 4 )
=> -8
sxtd( 5 2 )
=> 5
Related Topics
Logical and Relational Functions
Return to top