LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NOT GATE

Solved!
Go to solution

Hi,

 

I'm currently using a NOT GATE to convert the value of 1 to 0 and vice versa. But my problem is, when the input is 0 instead of changing it to 1, the Not Gate changed it to -1. And when the Input is 1, it changed it to -2. I couldn't figure out what is the problem.

 

 

Could someone help me? 

 

 

0 Kudos
Message 1 of 5
(3,967 Views)

The function is supposed to work that way. It will invert each bit. So, b00000000 is inverted to b111111111.

 

You can do a =0 followed by a Boolean to 0,1.

0 Kudos
Message 2 of 5
(3,964 Views)

Hey Tebu,

 

You could also add 2 to your output, though this will still allow you to pass invalid values into the not gate and get a non 0 or 1 output. If using this method it would be important to ensure your inputs are what you want them to be.

 

Regards,

 

Chris

National Instruments - Tech Support
Message 3 of 5
(3,937 Views)
Solution
Accepted by topic author tebu

Just use "subtract" function from numeric palette. Give constant "1" in terminal 'x' & connect your input value (0 or 1) into terminal 'y'. It will give you the invert values.

 

-Kumar.B

Message 4 of 5
(3,919 Views)

both method, you and the person above you could be used. Thanks mate!

0 Kudos
Message 5 of 5
(3,856 Views)