Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bitwise operation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===OR=== [[File:0...15 OR.svg|thumb|Bitwise OR of 4-bit integers]] A '''bitwise OR''' is a [[binary operation]] that takes two bit patterns of equal length and performs the [[Logical disjunction|logical inclusive OR]] operation on each pair of corresponding bits. The result in each position is 0 if both bits are 0, while otherwise the result is 1. For example: 0'''101''' (decimal 5) OR 0'''011''' (decimal 3) = 0'''111''' (decimal 7) The bitwise OR may be used to set to 1 the selected bits of the register described above. For example, the fourth bit of 0010 (decimal 2) may be set by performing a bitwise OR with the pattern with only the fourth bit set: '''0'''0'''1'''0 (decimal 2) OR '''1'''0'''0'''0 (decimal 8) = '''1'''0'''1'''0 (decimal 10)
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)