16 เครื่องหมายตรรกะ


ABA && BA || B
0000
0101
1001
1111
  • !1 = 0
  • !0 = 1
  • ใช้วงเล็บช่วยหากสมการเริ่มซับซ้อน และไม่มั่นใจเรื่องศักดิ์เครื่องหมาย

กฏของ ดี-มอร์แกน

"not (A and B)" is the same as "(not A) or (not B)"

"not (A or B)" is the same as "(not A) and (not B)"


เขียนในรูปโค๊ดจะได้

( ! (A && B) ) ==( (! A) || (! B) )

( ! (A || B) ) == ( (! A) && (! B) )

No comments:

Post a Comment