Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{backlinks>.}} ====== Wahrheitstabellen ====== <code python truthtable.py> def truthTable(op,numvar,title): print title print "-"*8*(numvar+2) for v in range(1 << numvar): l=[] for i in range(numvar): l.append((v>>i & 1)==1); print l[-1], print "\t", print "|\t",op(l) print truthTable(lambda x:not x[0],1,"A\t|\tnot A"); truthTable(lambda x:x[0] and x[1],2,"A\tB\t|\tA and B"); truthTable(lambda x:x[0] or x[1],2,"A\tB\t|\tA or B"); </code> Spielen mit logischen Schaltungen: http://www.cburch.com/logisim/ oder online https://simulator.io/board efinf/blcks2017/bitsundbytes/logischeoperatoren.txt Last modified: 2017/09/26 12:01by Ivo Blöchliger