Jump to content

Wp/dtp/Banis di de Morgan

From Wikimedia Incubator
< Wp | dtp
Wp > dtp > Banis di de Morgan

Banis di de Morgan (Boros Inggilis: de Morgan's laws) nopo nga' tongo tilin popiomut do tongo osimban don Boole (Boolean variables) maya' tolu katandaan: OM (AND), TOI (OR), miampai KON (NOT).

Latanon

Maya wayagait koubasan id sidtoodo dorud (electrical engineering) hingkaa govit do banis di de Morgan[1]:

Duo toi lobi osimban poinrayat nopo pamagait do katandaan OM, it tonduk habpang, pamagait do katandaan TOI, om it tuku id kaas do osimban hingkaa (roitan do tukukaas toi overline) toi tonduk pamagait do katandaan KON.

Poomitanan boros tokud Python

Banis diti okinam maya' tindur (code) mamakai do boros tokud Lopung (Python) hingkaa:

X = False #Nunu nopo gatang
Y = True #Nunu nopo gatang

Z = not (X and Y)
if (Z == ((not X) or (not Y))):
    print("Otopot")

Z = not (X or Y)
if (Z == ((not X) and (not Y))):
    print("Otopot")

Nung kinaman oinsanan gatang kawasa do om pasa pampang do induo ootus Otopot.[2]

Sukuon

  1. https://www.oxfordreference.com/display/10.1093/oi/authority.20110803095709902?p=emailAorp8zfgZ36co&d=/10.1093/oi/authority.20110803095709902
  2. https://gist.github.com/andergisomon/3d935a0b68222ccdccf806d529a45ae8