Pages: [1]   Go Down
Author Topic: Error in lang reference: compound bitwise OR  (|=)  (Read 612 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I think there's a mistake in the following text:

"Consequently - to set bits 0 & 1 of a variable, while leaving the
rest of the variable unchanged, use the compound bitwise AND
operator (&=) with the constant B00000011
1 0 1 0 1 0 1 0 variable
0 0 0 0 0 0 1 1 mask
----------------------
1 0 1 0 1 0 1 1        "

should read: "use the compound bitwise OR (|=) operator"

creates confusion...

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I corrected this and also split the page in two:
http://arduino.cc/en/Reference/BitwiseCompoundOr
http://arduino.cc/en/Reference/BitwiseCompoundAnd
Logged

Pages: [1]   Go Up
Jump to: