A newer version of Max is available. Click here to access the latest version of the documentation

>> Reference

Bit shift to the right

>>

Description

Shifts all bit values to the right. This has the effect of dividing a number by a power of two, but is less expensive in computer resources.

Examples

Same effect as dividing by a power of 2

Arguments

initial-value [int]

Optional

Sets an initial value for the number of bits by which to shift rightward.

Attributes

Common Box Attributes

Messages

bang

In left inlet: Performs the bit-shift with the numbers currently stored. If there is no argument, >> initially holds 0 as the number of bits by which to shift.

int

Arguments

input [int]
In left inlet: All bits of the number, in binary form, are shifted to the right by a certain number of bits. The resulting number is sent out the outlet.

  (inlet1)

Arguments

shift-amount [int]
In right inlet: The number is stored as the number of bits to right-shift the number in the left inlet.

float

Arguments

input [float]
See the int listing.

set

Arguments

set-input [int]
Sets input to the object without causing output (bang will output it).

list

Arguments

input [int]
shift-amount [int]
In left inlet: The first number is bit-shifted to the right by the number of bits specified by the second number.

Output

int

The number in the left inlet is bit-shifted to the right by a certain number of bits. The number of bits by which to shift is specified by the number in the right inlet. The output is the resulting bit-shifted number.

See Also

Name Description
!/
<<