def ADD(x, y):
    return (x + y) & 0xff

def SUB(x, y):
    return (x - y) & 0xff

def OR(x, y):
    return (x | y) & 0xff

def AND(x, y):
    return (x & y) & 0xff

def XOR(x, y):
    return (x ^ y) & 0xff