What is Difference between some operators |, ^, &, &^. in Golang

Answer • 1 Asked • Jan 14 2020
Recently I read golang specification and faced with some interesting operators:
& bitwise AND integers | bitwise OR integers ^ bitwise XOR integers &^ bit clear (AND NOT) integers

I've tried to play with it, but the only one I have understood is that "|" add integers and "+" operator additionally work with floats, strings etc.

What they are used for in practice? Could anyone give some explanation about these 4 operators above?

Write your answer...

On a mission to build Next-Gen Community Platform for Developers