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
Mask (computing)
(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!
===Masking bits to <code>0</code>=== More often in practice, bits are "masked ''off''" (or masked to <code>0</code>) than "masked ''on''" (or masked to <code>1</code>). When a bit is <code>AND</code>ed with a 0, the result is always 0, i.e. <code>Y AND 0 = 0</code>. To leave the other bits as they were originally, they can be <code>AND</code>ed with <code>1</code> as <code>Y AND 1 = Y</code> Example: Masking ''off'' the higher [[nibble]] (bits 4, 5, 6, 7) while leaving the lower nibble (bits 0, 1, 2, 3) unchanged. '''1001'''0101 '''1010'''0101 AND '''0000'''1111 '''0000'''1111 = '''0000'''0101 '''0000'''0101
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)