matlab code for verifying the de morgan s theorem
#1

Request about matlab code for verifying the de morgan s theorem
Reply
#2
In propositional logic and boolean algebra, De Morgan's laws are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation.

The rules can be expressed in English as:
the negation of a conjunction is the disjunction of the negations; and
the negation of a disjunction is the conjunction of the negations;
or
the complement of the union of two sets is the same as the intersection of their complements; and
the complement of the intersection of two sets is the same as the union of their complements.
Reply
#3

In Boolean Algebra, there are some very important laws which are called the De Morgan's laws (the spelling can change from author to author).

These laws teach us how to interchange NOT with AND or OR logical operators.


In formal logic, De Morgan's laws are rules relating the logical operators 'and' and 'or' in terms of each other via negation:


not(p or q) =
(not p) and (not q)


not(p and q) =
(not p) or (not q)
Using logic gates (commonly used in Digital Electronics), they can be expressed in two forms:

the OR form:
De Morgan's laws

the AND form:
DeMorgan's law

In Matlab, these laws can be confirmed very easily.
Let's create a script file like this:


% Let x and y be column vectors
x = [0 0 1 1]'
y = [0 1 0 1]'

% We can confirm the OR form of the law with these two lines
x_or_y = x|y
DeMorg1 = not(not(x)& not(y))

% We can verify the AND form of the law with these two lines
x_and_y = x&y
DeMorg2 = not(not(x) | not(y))


When we run it, we get this output:

x =

0
0
1
1
y =

0
1
0
1

x_or_y =

0
1
1
1
DeMorg1 =

0
1
1
1
x_and_y =

0
0
0
1
DeMorg2 =

0
0
0
1

Which confirms the De Morgan's laws.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: to verify de morgan theorem using ic 7400, matlab code to verify sampling theorem, sampling theorem verification using matlab, study de morgan theorem by using ic 7400, executable program for sampling theorem using matlab, de morgan theorem cirkite diagram, project work on verifying basic proportionality theorem by putting triangles on parallel lines,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  matlab code 1 3,466 31-01-2019, 02:52 PM
Last Post: [email protected]
  underwater optical communication matlab code 0 3,305 02-11-2018, 07:32 PM
Last Post: Guest
  source code for blood group detection in matlab 0 6,621 22-10-2018, 10:59 AM
Last Post: Guest
  hackchina matlab code 0 639 27-09-2018, 10:45 PM
Last Post: Guest
  heart disease prediction system source code for matlab 0 783 27-09-2018, 04:40 PM
Last Post: Guest
  matlab code for echo hiding 1 805 17-08-2018, 07:35 PM
Last Post: Guest
  matlab code for echo hiding 1 732 17-08-2018, 07:34 PM
Last Post: Guest
  download source code of zrp in matlab 0 756 14-08-2018, 02:48 PM
Last Post: Guest
  matlab source code for anomaly detection 0 628 01-08-2018, 08:00 PM
Last Post: Guest
  railway track crack detection using matlab 0 620 31-07-2018, 09:56 AM
Last Post: Guest

Forum Jump: