Created
July 23, 2013 00:50
-
-
Save Fhernd/6059001 to your computer and use it in GitHub Desktop.
Demostración del operador bitwise OR inclusivo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OperadorOR | |
{ | |
static void Main() | |
{ | |
byte A = 39; | |
byte B = 42; | |
byte resultado = (byte) (A|B); | |
Console.WriteLine(Convert.ToString(resultado,2)); // Imprime 101111 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment