Home > Mobile >  The great spirit to solve
The great spirit to solve

Time:10-02

Why use bitwise or to represent the logic and

CodePudding user response:

Save memory, or storage

CodePudding user response:

To save memory, a variable to store a variety of types, and completely does not affect the use,

CodePudding user response:

Is the individual bits of a number of 01 state to represent the state of complete vehicle,
For example
0 x01 - & gt; Vetical
0 x01 & lt; <1 - & gt; Center_horizontal
0 x01 | (0 x01 & lt; <1)=0 x03 this data means vetical | center_horizontal this state,

CodePudding user response:

Isn't for the sake of convenience?
  • Related