HomeManualTopicsTypesSymbols

std::shift_right

bitwise shift-right operation

Parameters

value
the value to be shifted
shift
the number of bits to shift

Result

shifted
the shifted value

Description

The first operand (must be positive integer) is shifted right by the number of bits specified by the second operandt, that must be a positive integer, too.

Bits that are shifted out on the right side are "lost".

There is no restriction in the size of the integer numbers!

Topic

Numbers

See also

std::shift_right bitwise shift-right operation
std::bit_and bitwise and operation
std::bit_or bitwise inclusive or operation
std::bit_xor bitwise exclusive or operation

Implemented by

std_types::positive_integer returns the right-shifted value