top of page

05 Bit Operations

bitRead() and bitWrite()

Reads or Writes a bit of a number.

bitRead(x, n) 

bitWrite(x, n)


x:            the number from which to read.

n:            which bit to read/write, starting at the least-significant


Returns (value)

The value of the bit (0 or 1).

© 2021 Odyssey Navigator. All rights reserved.

bottom of page