Re: How to shift register?
Posted: Fri Mar 19, 2010 5:48 pm
Hello
If your shifting a variable then you can do so inside a calculation icon as follows.
var = var >> 1
will shift one place to the right
var = var << 1
will shift one place to the left
var = var >> 1 is the same as var = var / 2
var = var >> 2 is the same as var = var / 4
A right shift can also be done as a divide.
var = var << 1 is the same as var = var * 2
var = var << 2 is the same as var = var * 4
A left shift can also be done as a multiply.
If your shifting a variable then you can do so inside a calculation icon as follows.
var = var >> 1
will shift one place to the right
var = var << 1
will shift one place to the left
var = var >> 1 is the same as var = var / 2
var = var >> 2 is the same as var = var / 4
A right shift can also be done as a divide.
var = var << 1 is the same as var = var * 2
var = var << 2 is the same as var = var * 4
A left shift can also be done as a multiply.