In computer science, a mask is data that is used for bitwise operations, particularly in a bit field.
Using a mask, multiple bits in a byte, nibble, word (etc.) can be set either on, off or inverted from on to off (or vice versa) in a single bitwise operation.
1
To turn certain bits on, the bitwise OR
operation can be used, following the principle that Y OR 1 = 1
and Y OR 0 = Y
. Therefore, to make sure a bit is on, OR
can be used with a 1
. To leave a bit unchanged, OR
is used with a 0
.
Example: Masking on the higher nibble (bits 4, 5, 6, 7) the lower nibble (bits 0, 1, 2, 3) unchanged.
0
More often, in practice, bits that are to be ignored are "masked off" (or masked to 0
) rather than "masked on" (or masked to 1
). There is no way to change a bit from on to off using the OR
operation. Instead, bitwise AND
is used. When a value is AND
ed with a 1
, the result is simply the original value, as in: Y AND 1 = Y
. However, AND
ing a value with 0
is guaranteed to return a 0
, so it is possible to turn a bit off by using AND
with 0
: Y AND 0 = 0
. To leave the other bits alone, use AND
with 1
.
This is the day I pray for you to die
I just don't fucking care
I hope I see you cry tonight
This is the day I bite
I'm going out of control
I'm your place to hide whenever you want to end your life
My skies are turning red
I can not breath your air
I hope tonight you choke in the seduction of despair
Send me flowers I'm fine, hate me!
Everything's alright, bite me!
It's your lovely words
And your sweet face
It's the way that you smile
Let me know when you are dying, hate me!
Let me know if you feel
Let me know if you feel the same
Let me know if you feel
Let me know
Bite me!
Bite me! Hate me!
Bad dreams made you real, this is the way I lived
Bad dreams made you real, but I'm going to finish it
Nightmares are nothing but a beast that eats you up
Go back to your hell suffer your own life
Just make sure you don't breed
Hate me! Bite me! No love lost!
Hate me! Bite me bitch!