bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Go/Go Tutorial
Go•Go Tutorial

Go Bitwise Operators

Flash cards

Review the key moves

1/3
Core idea

What is the main idea behind Go Bitwise Operators?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

Bitwise Operators

Bitwise operators are used on (binary) numbers:

OperatorNameDescriptionExample
&ANDSets each bit to 1 if both bits are 1x & y
ORSets each bit to 1 if one of two bits is 1xy
^XORSets each bit to 1 if only one of two bits is 1x ^ b
<<Zero fill left shiftShift left by pushing zeros in from the rightx << 2
>>Signed right shiftShift right by pushing copies of the leftmost bit in from the left, and let the rightmost bits fall offx >> 2

Previous

Go Logical Operators

Next

Go Conditions