BitShift

From ElectroDragon Wiki
Revision as of 01:58, 28 May 2021 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
0x50      = 1010 000
0x50 << 1 = 1010 0000 = A0
(I2C_DEVADDR<<1)|0x01 = A1 // move bit and OR operation
  • (byte) (0x0301 >> 8) = 0x03