logical AND:
(ab) | iand(a,b) |
00 | 0 |
01 | 0 |
10 | 0 |
11 | 1 |
logical OR:
(ab) | ior(a,b) |
00 | 0 |
01 | 1 |
10 | 1 |
11 | 1 |
logical XOR:
(ab) | ieor(a,b) |
00 | 0 |
01 | 1 |
10 | 1 |
11 | 0 |
logical NOT:
(a) | not(a) |
0 | -1 |
1 | -2 |
WTF? I have been bitten by the bitwise bear! In order to get zeros and ones, I must use ieor(1,a) instead of not(a). Pah.
Also, the tables in this post look all shit in my browser but I can't be bothered to fix them when I have Fortran to do instead.
Today's post was brought to you by the numbers 0 and 1 and the letter F.
No comments:
Post a Comment