Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203540

Re: Splitting 32 bit data into 8 and 25 bits for computing coincidence logic

$
0
0

As what altenbach suggested, going using boolean arrays uses more memory.

I also did a mistake in the screenshot. Before splitting the array, it will look for the index array starting from the least to most significant bits, so place the constant value of 26 instead of 6 as shown in the screenshot (which gives out 26-bit data on the top terminal instead).

 

You can follow altenbach's idea, but if you really want to split the 32-bit to 6-bit and 26-bit (in which the sum of number of bits of both splitting number is exactly 32-bit), there's a shortcut in doing that, where you only need 1 function, which is Quotient & Reminder function.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/glang/quotient_and_remainder/

 

All you need to do is to wire your data to x and binary value of "00000011111111111111111111111111" and the reminder (x-y*floor(x/y)) is your last 26-bit value and the integer quotient (floor(x/y)) will be your 1st 6-bit value.

 

Ee Lim


Viewing all articles
Browse latest Browse all 203540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>