Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://www.arduino.cc/en/Reference/IntegerConstants
- Example:
- B101 // same as 5 decimal ((1 * 2^2) + (0 * 2^1) + 1)
- The binary formatter only works on bytes (8 bits) between 0 (B0) and 255 (B11111111). If it is convenient to input an int (16 bits) in binary form you can do it a two-step procedure such as:
- myInt = (B11001100 * 256) + B10101010; // B11001100 is the high byte
Advertisement
Add Comment
Please, Sign In to add comment