Tag Archives: logic

What is DeMorgan’s Law in Programming? [ Answered with pics]

Demorgan’s Law is something that any student of programming eventually needs to deal with. Just tell me the “formula”: ok the diagram below shows the 2 ways that you can re-write a compound boolean expression using DeMorgan’s Law. (The very bottom of this page shows coding examples and common misconceptions) How do you say “no” to … Continue reading What is DeMorgan’s Law in Programming? [ Answered with pics] →

How to negate two things

A lot of students, when they’re first learning to program,  are surprised when they’re code doesn’t do what they want.  We are going to explore why that is .   Newby programmer trying to write “hey as long as these two things are false”…do some stuff hmm… how do we write that. It might actually … Continue reading How to negate two things →