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

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

$
0
0

Hi PRADEEP27,

 

Your question seems a bit confusing as you have only 32-bit number, but you want to split into 6-bit (or 8-bit) number and 25-bit number, in which the total number of bits are 31 bit (or 33 bit). Do you mean 32-bit --> 6-bit and 26-bit OR 8-bit and 24-bit?

 

Anyway, you'll need a few of these functions to make this work:

1) Number to Boolean Array function: This will convert the 32-bit number into 32-bit boolean array.

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

2) Split 1D Array function: This will help you to split 32-bit into 6-bit and 26-bit boolean arrays.

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

3) Boolean Array to Number function: This will convert back both the 6-bit number into 26-bit boolean arrays to unsigned 32-bit numbers.

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

 

Here is the screenshot of the code for your reference.

Capture.PNG

 

Ee Lim


Viewing all articles
Browse latest Browse all 203914

Trending Articles



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