Created
October 2, 2015 17:27
-
-
Save b4284/b20bfcf49469be3e1ec7 to your computer and use it in GitHub Desktop.
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 <inttypes.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| int main() { | |
| uint8_t F[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; | |
| for (uint8_t i = 0; i < 0xFF; ++i) { | |
| for (uint8_t q = 0; q < 8; ++q) { | |
| if ((i & F[q]) > 1) { | |
| assert((i ^ F[q]) == (i & ~F[q])); | |
| } | |
| } | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment