# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re: How does implies funciton works?

When I give 110 as x input and 1 as y input I am getting the output as 11111111111111111111111111111001 i.e 11001

But actually negation of 110 is 001; 001+ 1 is 010

Why I am getting the output as 11111111111111111111111111111001

Kind Regards,

Rashme SR

Message 11 of 14
(1,070 Views)
Solution
Accepted by srrashme

## Re: How does implies funciton works?

Your math is wrong.  0b110 inverted is 0b001, then the logical OR of 0b001 and 0b001 is 0b001.  But your input is not 0b110 it is actually 0b00000000000000000000000000000110 because your data type is a I32.  So your output is correct

0b00000000000000000000000000000110 inverted is 0b11111111111111111111111111111001, then logical OR with 0b00000000000000000000000000000001 is 0b11111111111111111111111111111001

Also I suspect the difference between your two outputs is due to how the signed data type is handled, changing all data types to a U32 results in the same output.

Message 12 of 14
(1,064 Views)

## Re: How does implies funciton works?

srrashme wrote:

But actually negation of 110 is 001; 001+ 1 is 010

OR is NOT an addition.  In digital math, + is often used to denote OR and * is AND.  So 001 + 001 = 001 when dealing with digital math (001 OR 001 = 001).

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 13 of 14
(1,063 Views)

## Re: How does implies funciton works?

I understood my mistake..

Thank you so much

Kind Regards,

Rashme SR

Message 14 of 14
(1,045 Views)