LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Logical Shift showing incorrect data

Solved!
Go to solution

Hello,

I am trying to shift a decimal number by 16 bits to left, using Logical Shift function in LabVIEW. To cross-check the result, I used an online converter that is showing the correct result. But, the same conversion is not happening with the logical left shift function. Can't figure it out, whats happening. Any idea?

Attached is the screenshot.

0 Kudos
Message 1 of 5
(2,612 Views)
Solution
Accepted by topic author Voyager7277

Change your Value1 to U32 representation. 

aputman
0 Kudos
Message 2 of 5
(2,600 Views)

Thanks@aputman!. It worked.

0 Kudos
Message 3 of 5
(2,580 Views)
Solution
Accepted by topic author Voyager7277

You are using an unsigned 16 bit integer, change that to an unsigned 32 bit integer and you will get the correct result.

 

mcduff

 

Snap34.png

 

EDIT: Beaten to an easy solution. 🙂

0 Kudos
Message 4 of 5
(2,558 Views)

Thanks @mcduff!.

0 Kudos
Message 5 of 5
(2,530 Views)