Create a script which yields the propositional logic for BITWISE AND (Conjunction), BITWISE OR (Disjunction), BITWISE XOR (EXCLUSIVE OR), Logical AND, Logical OR, Addition, Multiplication, and Bitwise NOT Inversion. THE OUTPUT SHOULD BE FORMATTED IN SIMILAR FORM AS THE RESULT ON PRIOR PAGE. (the format I know is right)

Here is my code:

- Code: Select all
`print("BITWISE")`

print("x y AND")

for x in [0,1]:

for y in [0,1]:

print(x,y,x&y)

print("x y OR")

for x in [0,1]:

for y in [0,1]:

print(x,y,x|y)

print("x y XOR")

for x in [0,1]:

for y in [0,1]:

print(x,y,x^y)

print("LOGICAL")

print("x y AND")

for x in [0,1]:

for y in [0,1]:

print(x,y,x and y)

print("x y OR")

for x in [0,1]:

for y in [0,1]:

print(x,y,x or y)

print("x y Addition")

for x in [0,1]:

for y in [0,1]:

print(x,y,x + y)

print("x y Multiplication")

for x in [0,1]:

for y in [0,1]:

print(x,y,x * y)

print("x y NOT")

for x in [0,1]:

for y in [0,1]:

print(x,y,x != y)

Thanks