AbstractBeliefs

Untitled

Jul 15th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. http://www.arduino.cc/en/Reference/IntegerConstants
  2.  
  3. Example:
  4. B101 // same as 5 decimal ((1 * 2^2) + (0 * 2^1) + 1)
  5.  
  6. 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:
  7. myInt = (B11001100 * 256) + B10101010; // B11001100 is the high byte
Advertisement
Add Comment
Please, Sign In to add comment