purplepenguin wrote:

I was getting all wrapped up with Boolean logic as we have just covered <, >, =, and, or and not operators the OU explained these as Boolean Logic operators. I now see the error is a mathematical one.

I was getting all wrapped up with Boolean logic as we have just covered <, >, =, and, or and not operators the OU explained these as Boolean Logic operators. I now see the error is a mathematical one.

Comparison operators (==, >, <, <=, >=, ===, etc, depending on language) are not boolean operators as they can take non boolean operands, but they do always return a boolean result.

Only the equality operator makes any sense with Boolean operands, and then only if you are comparing two boolean variables (i.e. not literals). (boolvar1 == boolvar2) will return true if, and only if, both variables are true or both variables are false (i.e. the same)

Cases like (boolvar1 == true) are nonsensical as

IF boolvar1 == 1 THEN .....

is equivalent to

IF boolvar1 THEN .....

Statistics: Posted by AndyBaxman — Mon Dec 10, 2012 1:02 pm

]]>

However I seem to recall that some Boolean algebras incorporate them as well. I suppose that = is trivially Boolean.

@Dutch_Master, Is logic a branch of maths or is maths a branch of logic? The answer of course depends on whether you ask a logician or a mathematician.

Statistics: Posted by guy — Wed Dec 05, 2012 7:58 pm

]]>

Thank you for your explanation, just as I thought although I was starting to doubt myself and wonder if I was missing something obvious.

I was getting all wrapped up with Boolean logic as we have just covered <, >, =, and, or and not operators the OU explained these as Boolean Logic operators. I now see the error is a mathematical one.

I have sent an email to my tutor. I am now wondering if maybe it was intentional to see if we are paying attention.

Thank you once again.

Statistics: Posted by purplepenguin — Wed Dec 05, 2012 7:11 pm

]]>

Statistics: Posted by Dutch_Master — Wed Dec 05, 2012 2:25 am

]]>

If it moves when Y is "greater than or equal to" -175 then it should move until eventually Y becomes less than -175, i.e. -176. Then it should stop.

"The sprite should not exceed -175" is unclear, since "exceed" is not mathematically defined. However, both possible meanings are wrong.

If "exceed" means "greater than" as in 170 exceeds -175, then that would lead to an incorrect statement, since the starting point well exceeds the stated limit.

If "exceed" means "have greater magnitude than" as in -175 has greater magnitude than 170, then that would also be incorrect, since as we have seen the sprite must pass through -175 and stop at -176.

However, the faulty logic is not Boolean, it is arithmetical.

Statistics: Posted by guy — Tue Dec 04, 2012 9:05 pm

]]>

Statistics: Posted by greg.d — Tue Dec 04, 2012 8:48 pm

]]>

I'm writing a Sense program for my HND at the OU and I'm not sure if I'm being stupid or whether I've spotted a typo. I wanted to check with people in the know before I email my tutor.

The task tells me:

Place the sprite at x:0 and y:170

So long as the y position of sprite is greater than or equals to -175 it should move down the stage in 1 step intervals.

To my mind if the sprite's y position is equal to -175 it should continue to move and end up at -176.

Later on i am told that the sprite should not exceed -175

How can the sprite be equal to -175 and still move 1 place down but not exceed -175.

Thank you for your patience

Statistics: Posted by purplepenguin — Tue Dec 04, 2012 5:11 pm

]]>