LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
wiebe@CARYA

rotate left\right with carry, remove required boolean

Status: New

This is a tiny thing, but it would probably be very easy to implement as well.

 

I use the Rotate Left With Carry and Rotate Right With Carry mostly to get the LSB or MSB. But when I do, I still have to wire the input boolean.
 Why not default it to false?

remove required boolean from rotate.jpg

4 Comments
crossrulz
Knight of NI

You know, this is one of those very little things that does just annoy me.  Just default to FALSE and leave me alone.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
AristosQueue (NI)
NI Employee (retired)

As a LV user, that's one that I would not want to be defaulted. If it bothers you, you can put a merge VI into your palettes so the node drops for you with the terminal already wired. That terminal is bordering on "core functionality" for me. I realize that it is a gray line whether a terminal is core or not to a node.

wiebe@CARYA
Knight of NI

It's intended core functionality is to rotate the boolean (the carry flag) in to the numeric. but also to return the fall off bit (also the carry).

 

I think most often it is used just to get the MSB or LSB, or even to just to check if anumber is odd or even.

 

I usually place the function, then get an error, check the error and see that the boolean is missing. I'm ok with it, I don't loose any sleep over it, but it just seems like a waste of clicks. I only have a few thousend click per day.

 

rolfk
Knight of NI

For odd or even check, an AND with 0x1 and the according !=0 or ==0 is likely at least as performant if not better. It's what I normally do. Rotate with carry is in fact an "expensive" machine opcode on the x86 architecture compared to an AND (but what is a single clock cycle on a 2GHz CPU??).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390