Manuals/calci/BITRSHIFTZ

From ZCubes Wiki
Revision as of 14:55, 4 December 2017 by Devika (talk | contribs) (Created page with "<div style="font-size:30px">'''BITRSHIFTZ(a,b)'''</div><br/> *where <math>a</math> is the number to be shifted right *<math>b</math> is number of bits to be shifted == Desc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
BITRSHIFTZ(a,b)


  • where is the number to be shifted right
  • is number of bits to be shifted


Description

  • BITRSHIFT() returns a number shifted to the right, by number of digits specified in the argument.
  • should be an integer greater than or equal to 0.
  • must be an integer value.
  • Shifting a number right is equivalent to to removing digits from the rightmost side of the binary representation of the number.

For example, a 1-bit shift to the right on the decimal value 4 converts its binary value (100) to 010, or 2 in decimal.

  • If either argument is a non-numeric value, BITRSHIFT returns the #VALUE! error value.


Examples

  1. =BITRSHIFT(8,2) = 2
  2. =BITRSHIFT(14,3) = 1
  3. =BITRSHIFT(-3,1) = -2
  4. =BITRSHIFT(17,-2) = 0


See Also


References