Difference between revisions of "Manuals/calci/BITRSHIFTZ"

From ZCubes Wiki
Jump to navigation Jump to search
(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...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<div style="font-size:30px">'''BITRSHIFTZ(a,b)'''</div><br/>
 
<div style="font-size:30px">'''BITRSHIFTZ(a,b)'''</div><br/>
 
+
where
*where <math>a</math> is the number to be shifted right
+
* <math>a</math> is the number to be shifted right
 
*<math>b</math> is number of bits to be shifted
 
*<math>b</math> is number of bits to be shifted
 +
**BITRSHIFTZ(), returns a number shifted to the right, by number of digits specified in the argument.
  
  
 
== Description ==
 
== Description ==
 
+
BITRSHIFTZ(a,b)
*BITRSHIFT() returns a number shifted to the right, by number of digits specified in the argument.
 
 
*<math>a</math> should be an integer greater than or equal to 0.
 
*<math>a</math> should be an integer greater than or equal to 0.
 
*<math>b</math> must be an integer value.
 
*<math>b</math> 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.  
 
*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.
 
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.
+
*If either argument is a non-numeric value, BITRSHIFTZ returns the #VALUE! error value.
 
 
 
 
  
 
== Examples ==
 
== Examples ==
  
#=BITRSHIFT(8,2) =  2
+
#=BITRSHIFTZ(10,3) =  1
#=BITRSHIFT(14,3) = 1
+
#=BITRSHIFTZ(45,32) = 45
#=BITRSHIFT(-3,1) = -2
+
#=BITRSHIFTZ(-21,5) = 134217727
#=BITRSHIFT(17,-2) = 0
+
#=BITRSHIFTZ(17,-2) = 0
  
 +
==Related Videos==
  
 +
{{#ev:youtube|7C37dVujoBI|280|center|BITSHIFT OPERATORS}}
  
 
==See Also==
 
==See Also==

Latest revision as of 13:56, 11 March 2019

BITRSHIFTZ(a,b)


where

  • is the number to be shifted right
  • is number of bits to be shifted
    • BITRSHIFTZ(), returns a number shifted to the right, by number of digits specified in the argument.


Description

BITRSHIFTZ(a,b)

  • 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, BITRSHIFTZ returns the #VALUE! error value.

Examples

  1. =BITRSHIFTZ(10,3) = 1
  2. =BITRSHIFTZ(45,32) = 45
  3. =BITRSHIFTZ(-21,5) = 134217727
  4. =BITRSHIFTZ(17,-2) = 0

Related Videos

BITSHIFT OPERATORS

See Also


References