Jump to content

Binary


vultac

Recommended Posts

Hi guys, ive been wondering if there is anywhere in labview that i could program something so that the 1st 2bits would stay constant after i apply an addition to the previous set of bits after a for loop everyttime?

for eg.

(starting bit) (first 2 bits doesnt change) (first 2 bit doesnt change)

00000010 -> 00000110 -> 00001110 ???

Link to comment

QUOTE (vultac @ Nov 29 2008, 06:43 PM)

Hi guys, ive been wondering if there is anywhere in labview that i could program something so that the 1st 2bits would stay constant after i apply an addition to the previous set of bits after a for loop everyttime?

for eg.

(starting bit) (first 2 bits doesnt change) (first 2 bit doesnt change)

00000010 -> 00000110 -> 00001110 ???

The tools you need are in the Programming >> Boolean and Programming >> Numeric >> Data Manipulation palettes. The boolean logic functions (AND/OR/XOR/etc.) will all operate bitwise if you pass in U32/I32/etc. data, and there are also shift and rotate functions.

Link to comment

QUOTE (vultac @ Nov 29 2008, 06:43 PM)

Hi guys, ive been wondering if there is anywhere in labview that i could program something so that the 1st 2bits would stay constant after i apply an addition to the previous set of bits after a for loop everyttime?

for eg.

(starting bit) (first 2 bits doesnt change) (first 2 bit doesnt change)

00000010 -> 00000110 -> 00001110 ???

If you want to leave the lower two bits alone, then simply increment by 4; incrementing by 8 leaves the lower 3 bits alone, by 16 leaves the lower 4 alone, etc.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.