Okay, I'm in need of performing a bit of boolean math.
What I'm wanting to do is AND two numbers together.
I was surprised to see that it actually performed correctly in DBP, but in C++ it doesn't work.
Here's what I'm wanting:
100
-AND-
001
This should obviously be FALSE, because when we and them together, all bits should be 0.
DBP did this fine by using the following code:
Here's the C++ code I tried to use with this:
This returns TRUE in C++. What I'm thinking that it's doing is looking at the 4... saying "That's a True value", then looking at the 1, saying that "That's a True value also!" then when it ands both "true" values together it gets a "true" output. This isn't what I want.
I've searched google for as long as I can stand only finding nothing. Any searches for "Boolean operations" or anything relating to "boolean", gives me boolean data type pages, or the same boolean operators that I've been trying to use.
Does anyone know how to do what I'm after here?
The one and only,