Pod pretpostavkom da ti trebaju
"bitwise operators"
Citat:
& bitwise AND; compares two bits and generates a 1 result if both bits are 1, otherwise it returns 0.
| bitwise inclusive OR; compares two bits and generates a 1 result if either or both bits are 1, otherwise it returns 0.
^ bitwise exclusive OR; compares two bits and generates a 1 result if the bits are complementary, otherwise it returns 0.
~ bitwise complement; inverts each bit. ~ is used to create destructors.
>> bitwise shift right; moves the bits to the right, discards the far right bit and if unsigned assigns 0 to the left most bit, otherwise sign extends.
<< bitwise shift left; moves the bits to the left, it discards the far left bit and assigns 0 to the right most bit.
(preuzeto iz CBuilder6 help-a pa ne daj da te zbuni pominjanje destruktora, to ovde ne vazi ...)
ili drugim recima
radi se o operatorima nad binearnom zapisu celobrojnih vrednosti
iz matematike poznati (bulova algebra) & - i, | - ili, ^ - ekskluzivno i, ~ - ne, >> i << nisu klasicni operatori bulove algebre
nego su operatori shiftovanja ili "pomeranja" bitova u levu odnosno desnu stranu...
00100 >> 1 == 00010
00100 >> 2 == 00001
00100 >> 3 == 00000
00101 << 1 == 01010
00101 << 2 == 10100
00101 << 3 == 01000 // (ovo je pod uslovom da broj sadrzi maksimum 5 bita, inace je vrednost 101000 ako sadrzi vise bitova,
tu moras paziti na tip podatka "unsigned char", "unsigned short", ili "unsigned int"
kod "signed" vrednosti ove operacije mogu da promene znak odnosno moras voditi racuna da se negativni brojevi predstavljaju
komplementom ...
To je ukratko, znaci nema neke filozofije, ako hoces na srpskom jeziku uzmi neku knjigu iz osnova racunarstva i pogledaj
sekciju "binearni zapis" ili "operacije nad binearnim brojevima" ...