Skip to content

Glossary: Algorithms Beyond the Basics in Go

&^ (and not)

Also written: and not, bit clear

A Go operator that keeps a's bits except where b has a 1. It is how you turn a flag off, for example `options &^ grind`.

Where the book teaches it

Related terms

BitmaskFlagBit operators