Skip to content

Commit 88b97a3

Browse files
author
SimonePDA
authored
Update int.adoc
bitshift right operator and unsigned int
1 parent ed45d1d commit 88b97a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Language/Variables/Data Types/int.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ On the Arduino Due, an int stores a 32-bit (4-byte) value. This yields a range o
2525

2626
int's store negative numbers with a technique called (http://en.wikipedia.org/wiki/2%27s_complement[2's complement math]). The highest bit, sometimes referred to as the "sign" bit, flags the number as a negative number. The rest of the bits are inverted and 1 is added.
2727

28-
The Arduino takes care of dealing with negative numbers for you, so that arithmetic operations work transparently in the expected manner. There can be an unexpected complication in dealing with the link:../../structure/bitwise-operators/bitshiftRight[bitshift right operator] (>>) however.
28+
The Arduino takes care of dealing with negative numbers for you, so that arithmetic operations work transparently in the expected manner. There can be an unexpected complication in dealing with the link:../../structure/bitwise-operators/bitshiftright/[bitshift right operator] (>>) however.
2929
[%hardbreaks]
3030

3131

@@ -59,7 +59,7 @@ The Arduino takes care of dealing with negative numbers for you, so that arithme
5959

6060
[float]
6161
=== Notes and Warnings
62-
When signed variables are made to exceed their maximum or minimum capacity they _overflow_. The result of an overflow is unpredictable so this should be avoided. A typical symptom of an overflow is the variable "rolling over" from its maximum capacity to its minimum or vice versa, but this is not always the case. If you want this behavior, use link:unsignedInt{ext-relative}[unsigned int].
62+
When signed variables are made to exceed their maximum or minimum capacity they _overflow_. The result of an overflow is unpredictable so this should be avoided. A typical symptom of an overflow is the variable "rolling over" from its maximum capacity to its minimum or vice versa, but this is not always the case. If you want this behavior, use link:unsignedint{ext-relative}/[unsigned int].
6363

6464

6565
--
@@ -77,4 +77,4 @@ When signed variables are made to exceed their maximum or minimum capacity they
7777
* #LANGUAGE# link:../../constants/integerconstants[Integer Constants]
7878

7979
--
80-
// SEE ALSO SECTION ENDS
80+
// SEE ALSO SECTION ENDS

0 commit comments

Comments
 (0)