Created
August 21, 2014 12:19
-
-
Save jadudm/366292b2847235a92e5e to your computer and use it in GitHub Desktop.
Bitwise AND of two 8-bit Values
This file contains hidden or 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
#include <stdio.h> | |
#include <stdint.h> | |
void main () { | |
uint8_t a, b, out; | |
a = 42; | |
b = 2; | |
out = a & b; | |
/* out should now be 2. */ | |
printf ("a = %d, b = %d, out = %d\n", a, b, out); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment