| SYNOPSIS |
| string and_bits(string str1, string str2); |
| |
| BESCHREIBUNG |
| <str1> und <str2> seien beides Bitstrings. Das Resultat von and_bits() |
| ist ein Bitstring mit dem binaeren Und von <str1> und <str2>, das |
| heisst ein String, in dem ein Bit nur gesetzt ist, wenn das |
| entsprechende Bit in beiden Strings <str1> und <str2> gesetzt ist. |
| |
| BEISPIEL |
| string s1, s2, s3; |
| |
| s1 = set_bit("", 3); s1 = set_bit(s1, 15); -> s1 is "( (" |
| s2 = set_bit("", 3); s2 = set_bit(s2, 4); -> s2 is "8" |
| |
| s3 = and_bits(s1, s2); |
| |
| --> s3 ist jetzt "8", d.h. ein Bitstring, in dem nur das 3. Bit |
| gesetzt ist. |
| |
| SIEHE AUCH |
| clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E), |
| count_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E) |