DeMorgan Theorem & Excel Formula

Click For Summary
DeMorgan's Theorem allows for the transformation of logical expressions by switching ANDs to ORs and vice versa using NOTs. This principle is applicable in programming, particularly in the context of loops, where conditions for continuation or termination can be expressed using DeMorgan's logic. For example, a WHILE loop condition can be converted to a REPEAT loop condition by applying DeMorgan's Theorem appropriately. The discussion highlights the practical use of these logical transformations in programming scenarios involving compound conditions. Understanding these concepts aids in effectively managing control flow in code.
Newtonian_gravity21
Messages
3
Reaction score
0
=IF (C1>1,"yes","No") I think that's right :rolleyes:

Does Demorgan Theorem use a simular logic when doing calculations for logic gates, using true and false properities?
 
Mathematics news on Phys.org
Demorgan Theorem states that you can change the AND to OR and vise versa by using NOTs. Such as:
A AND B = NOT (NOT A OR NOT B)
A OR B = NOT (NOT A AND NOT B)

Where does this come from? I see it when using loops in programming. A WHILE loop needs a condition to continue looping whilst a REPEAT loop needs a condition to stop looping. They use opposite logic. Now the problem comes when you want to use a different loop which has a compound condition.

EG WHILE (end of file not reached) and (user did not press esc) read file

Now which is the equivalent expression to make a REPEAT loop?

REPEAT read file UNTIL (end of file reached) OR (user pressed esc)

See? We used DeMorgans except that we did not use the outer NOT because other wise it would have returned the same result as with the first loop. Simple huh?
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K