Skip to content

Instantly share code, notes, and snippets.

int = 12;
boolean b;
b = 12 == (3 | 6 | 5 | 7 | 32);
b = 12 == 39;
b = false;
@rbe
rbe / BitTestOutput.java
Created August 25, 2012 12:06
Output of BitTest.java
( 3 | 6) == 7, ist 7
( 7 | 5) == 7, ist 7
( 7 | 7) == 7, ist 7
(32 | 7) == 7, ist 39
12 == (3 | 6 | 5 | 7 | 32) ? false
12 == 39 ? false
@rbe
rbe / Binary.txt
Created August 25, 2012 12:05
Binary System
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
128 64 32 16 8 4 2 1
@rbe
rbe / Binary.txt
Created August 25, 2012 12:05
Binary System
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
128 64 32 16 8 4 2 1
3 | 6
0 0 0 0 0 0 1 1 | 0 0 0 0 0 1 1 0 == 0 0 0 1 1 1 ... ist 7
7 | 5
0 0 0 0 0 1 1 1 | 0 0 0 0 0 1 0 1 == 0 0 0 1 1 1 ... ist 7
7 | 7
0 0 0 0 0 1 1 1 | 0 0 0 0 0 1 1 1 == 0 0 0 1 1 1 ... ist 7
7 | 32
128 64 32 16 8 4 2 1
====================
0 0 1 0 0 0 0 0
0 * 128
+ 0 * 64
+ 1 * 32
+ 0 * 16
+ 0 * 8
+ 0 * 4
@rbe
rbe / Number7Binary.txt
Created August 25, 2012 12:01
Number 7 in binary representation
128 64 32 16 8 4 2 1
====================
0 0 0 0 0 1 1 1
0 * 128
+ 0 * 64
+ 0 * 32
+ 0 * 16
+ 0 * 8
+ 1 * 4
@rbe
rbe / Number5Binary.txt
Created August 25, 2012 12:00
Number 5 in binary representation
128 64 32 16 8 4 2 1
====================
0 0 0 0 0 1 0 1
0 * 128
+ 0 * 64
+ 0 * 32
+ 0 * 16
+ 0 * 8
+ 1 * 4
@rbe
rbe / Number6Binary.txt
Created August 25, 2012 11:59
Number 6 in binary representation
128 64 32 16 8 4 2 1
====================
0 0 0 0 0 1 1 0
0 * 128
+ 0 * 64
+ 0 * 32
+ 0 * 16
+ 0 * 8
+ 1 * 4
@rbe
rbe / Number3Binary.txt
Created August 25, 2012 11:55
Number 3 in binary representation
128 64 32 16 8 4 2 1
====================
0 0 0 0 0 0 1 1
0 * 128
+ 0 * 64
+ 0 * 32
+ 0 * 16
+ 0 * 8
+ 0 * 4