data_types
If you want to send us your comments, please do so. Thanks
More on comments
Arduino Data Types
int and unsigned int
An int behaves like a saw tooth. Until (16^2-1)/2 the numbers go up. From (16^2-1)/2 the negative numbers go down
Two's complement is used
1 2 3 4 5 ...... 32765 327667 32767 -327666 -23765 -32764 ...... -5 -4 -3 -2 -1 0 1 2 3 4 5
This is logical because when you do -32765+1 you get -32764
When you use an unsigned int an somewhere in the program process it as an int, then, when the value is > 32767 it will be interpreted as a negative number
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.
data_types.txt · Last modified: 28-05-2020 02:02 by wim