Skip to content

Instantly share code, notes, and snippets.

@jadudm
Created August 21, 2014 12:19
Show Gist options
  • Save jadudm/366292b2847235a92e5e to your computer and use it in GitHub Desktop.
Save jadudm/366292b2847235a92e5e to your computer and use it in GitHub Desktop.
Bitwise AND of two 8-bit Values
#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