import blocklogic
print("This is simulating the XOR gate using RUQLG - TNOR gate\n")
print("Enter the following values : \n\n")

y='y'
while y == 'y':
    B1 = int(input("Enter A1 : "))
    B2 = int(input("Enter A2 : "))
    C1 = int(input("Enter B1 : "))
    C2 = int(input("Enter B2 : "))
    A1 = 0
    A2 = 0
    L = 3

    A0 = blocklogic.blockpos(L, A1, A2) # Block A
    # print('A0 = ', A0)
    B0 = blocklogic.blockpos(L, B1, B2)  # Block B
    # print('B0 = ',B0)
    sum = blocklogic.beamcombiner(A0, B0)
    # print ('sum = ', sum)
    v1, v2 = blocklogic.beamsplitter(sum)
    v0 = blocklogic.blockpos(L, v1, v2)  # Block V
    # print ('v0 =', v0)
    w1, w2 = blocklogic.beamsplitter(sum)
    w0 = blocklogic.blockpos(L, w1, w2)  # Block W
    # print('w0 = ',w0)
    C0 = blocklogic.blockpos(v0, C1, C2)  # Block C
    # print('C0 = ',C0)
    x1, x2 = blocklogic.beamsplitter(w0)
    x0 = blocklogic.blockneg(L, x1, x2)  # Block X
    # print('x0 = ',x0)
    y0 = blocklogic.blockpos(x0, C1, C2)  # Block Y
    # print('y0 = ',y0)
    z1, z2 = blocklogic.beamsplitter(C0)
    z0 = blocklogic.blockneg(v0, z1, z2)  # Block Z
    # print('z0 = ',z0)
    R = blocklogic.beamcombiner(y0, z0)
    blocklogic.displayer(R)
    y = input('to continue press y   \n')
ad4ba6253f7f60d04a1a16e24ea23f972521b09c
<mask token>

<mask token>
print('This is simulating the XOR gate using RUQLG - TNOR gate\n')
print('Enter the following values : \n\n')
<mask token>
while y == 'y':
    B1 = int(input('Enter A1 : '))
    B2 = int(input('Enter A2 : '))
    C1 = int(input('Enter B1 : '))
    C2 = int(input('Enter B2 : '))
    A1 = 0
    A2 = 0
    L = 3
    A0 = blocklogic.blockpos(L, A1, A2)
    B0 = blocklogic.blockpos(L, B1, B2)
    sum = blocklogic.beamcombiner(A0, B0)
    v1, v2 = blocklogic.beamsplitter(sum)
    v0 = blocklogic.blockpos(L, v1, v2)
    w1, w2 = blocklogic.beamsplitter(sum)
    w0 = blocklogic.blockpos(L, w1, w2)
    C0 = blocklogic.blockpos(v0, C1, C2)
    x1, x2 = blocklogic.beamsplitter(w0)
    x0 = blocklogic.blockneg(L, x1, x2)
    y0 = blocklogic.blockpos(x0, C1, C2)
    z1, z2 = blocklogic.beamsplitter(C0)
    z0 = blocklogic.blockneg(v0, z1, z2)
    R = blocklogic.beamcombiner(y0, z0)
    blocklogic.displayer(R)
    y = input('to continue press y   \n')

<mask token>
print('This is simulating the XOR gate using RUQLG - TNOR gate\n')
print('Enter the following values : \n\n')
y = 'y'
while y == 'y':
    B1 = int(input('Enter A1 : '))
    B2 = int(input('Enter A2 : '))
    C1 = int(input('Enter B1 : '))
    C2 = int(input('Enter B2 : '))
    A1 = 0
    A2 = 0
    L = 3
    A0 = blocklogic.blockpos(L, A1, A2)
    B0 = blocklogic.blockpos(L, B1, B2)
    sum = blocklogic.beamcombiner(A0, B0)
    v1, v2 = blocklogic.beamsplitter(sum)
    v0 = blocklogic.blockpos(L, v1, v2)
    w1, w2 = blocklogic.beamsplitter(sum)
    w0 = blocklogic.blockpos(L, w1, w2)
    C0 = blocklogic.blockpos(v0, C1, C2)
    x1, x2 = blocklogic.beamsplitter(w0)
    x0 = blocklogic.blockneg(L, x1, x2)
    y0 = blocklogic.blockpos(x0, C1, C2)
    z1, z2 = blocklogic.beamsplitter(C0)
    z0 = blocklogic.blockneg(v0, z1, z2)
    R = blocklogic.beamcombiner(y0, z0)
    blocklogic.displayer(R)
    y = input('to continue press y   \n')

import blocklogic
print('This is simulating the XOR gate using RUQLG - TNOR gate\n')
print('Enter the following values : \n\n')
y = 'y'
while y == 'y':
    B1 = int(input('Enter A1 : '))
    B2 = int(input('Enter A2 : '))
    C1 = int(input('Enter B1 : '))
    C2 = int(input('Enter B2 : '))
    A1 = 0
    A2 = 0
    L = 3
    A0 = blocklogic.blockpos(L, A1, A2)
    B0 = blocklogic.blockpos(L, B1, B2)
    sum = blocklogic.beamcombiner(A0, B0)
    v1, v2 = blocklogic.beamsplitter(sum)
    v0 = blocklogic.blockpos(L, v1, v2)
    w1, w2 = blocklogic.beamsplitter(sum)
    w0 = blocklogic.blockpos(L, w1, w2)
    C0 = blocklogic.blockpos(v0, C1, C2)
    x1, x2 = blocklogic.beamsplitter(w0)
    x0 = blocklogic.blockneg(L, x1, x2)
    y0 = blocklogic.blockpos(x0, C1, C2)
    z1, z2 = blocklogic.beamsplitter(C0)
    z0 = blocklogic.blockneg(v0, z1, z2)
    R = blocklogic.beamcombiner(y0, z0)
    blocklogic.displayer(R)
    y = input('to continue press y   \n')

import blocklogic
print("This is simulating the XOR gate using RUQLG - TNOR gate\n")
print("Enter the following values : \n\n")

y='y'
while y == 'y':
    B1 = int(input("Enter A1 : "))
    B2 = int(input("Enter A2 : "))
    C1 = int(input("Enter B1 : "))
    C2 = int(input("Enter B2 : "))
    A1 = 0
    A2 = 0
    L = 3

    A0 = blocklogic.blockpos(L, A1, A2) # Block A
    # print('A0 = ', A0)
    B0 = blocklogic.blockpos(L, B1, B2)  # Block B
    # print('B0 = ',B0)
    sum = blocklogic.beamcombiner(A0, B0)
    # print ('sum = ', sum)
    v1, v2 = blocklogic.beamsplitter(sum)
    v0 = blocklogic.blockpos(L, v1, v2)  # Block V
    # print ('v0 =', v0)
    w1, w2 = blocklogic.beamsplitter(sum)
    w0 = blocklogic.blockpos(L, w1, w2)  # Block W
    # print('w0 = ',w0)
    C0 = blocklogic.blockpos(v0, C1, C2)  # Block C
    # print('C0 = ',C0)
    x1, x2 = blocklogic.beamsplitter(w0)
    x0 = blocklogic.blockneg(L, x1, x2)  # Block X
    # print('x0 = ',x0)
    y0 = blocklogic.blockpos(x0, C1, C2)  # Block Y
    # print('y0 = ',y0)
    z1, z2 = blocklogic.beamsplitter(C0)
    z0 = blocklogic.blockneg(v0, z1, z2)  # Block Z
    # print('z0 = ',z0)
    R = blocklogic.beamcombiner(y0, z0)
    blocklogic.displayer(R)
    y = input('to continue press y   \n')