Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def RemXor(x,y):
- CopyY=y
- XSub=0
- YSub=0
- if x>=y:
- while x>=y:
- BitX=number_of_bits(x)
- BitY=number_of_bits(y)
- if BitX>BitY:
- YSub=BitX-BitY
- else:
- XSub=BitY-BitX
- CopyY=y<<YSub
- x=x<<XSub
- x=x^CopyY
- BitX=number_of_bits(x)
- BitY=number_of_bits(y)
- if BitX==BitY:
- x=x^y
- else:
- x=y-x
- return x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement