Did you know ... | Search Documentation: |
![]() | Pack canny_tudor -- prolog/canny/shifter.pl |
The Shifter argument provides three different ways to specify a bit
shift and bit width: either by an exclusive range using +
and -
terms; or an inclusive range using :
terms; or finally just a
single bit shift which implies a width of one bit. Colons operate
inclusively whereas plus and minus apply exclusive upper ranges.
It first finds the amount of Shift required and the bit Width. After computing the lefthand and righthand bit masks, it finally performs a shift-mask or mask-shift for left and right shifts respectively.