//a and b= 0 adding zero to a number must result 0 //a nor b = 0 a can never be not 0 inb resullt //a xnor b =0 a cant be exclusively not 0 simultaneously //b=1 //or //1 and b =1 and 1 to a number will always be true //1 or 1 = true unless both values are 1 //1 not 1 = 0 they are both different then result 1 // xnor 1 =1 (exclusively not both therefore true) //1 xor 1 = 1 (exclusively) unless different /* Bitwise table ref & -and- r=x~~y | -or- r=x||y //! not- r=x<>y ~ -not- r=x<>y ^ -xor- r=x<>y >> -right shift- r=a>>value << -left shift-- r=a<y endfunction r function BitwiseNor(a as integer) r as integer l as string l=str(a) s as string For i=len(l) to 0 step -1 s=(str(i)+"="+Bin(i)) next i if val(s) then r=val(s,2) endfunction r function BitwiseXor(x as integer,y as integer) r as integer r=x^y endfunction r function BitwiseXNor(a as integer,b as integer) r as integer rs as string d as integer c as string //c=str(BitwiseOr(a,b)) //r=(val(c,2)) r=a<>b^a<>b rs=bin(r) r=0^a<>b r=val(str(r),2) endfunction r function BitwiseToString(a as integer) l as string l=str(a) s as string For i=0 to len(l) s=(str(i)+"="+Bin(i)) next i endfunction s /// >>>>>extras function BitwiseShiftLeft(a as integer,value as integer) if value=0 then exitfunction 0 r as integer r=a<>value endfunction r function BitwiseShift(a as integer, opp as integer, value as integer) r as integer if value=-0 then exitfunction 0 if Opp = 0 then exitfunction 0 if opp > 0 r=a>>value exitfunction r endif if opp < 0 r=a<