home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_03 / 159.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-21  |  587KB  |  2550x3300
Labels: book | crt screen | daybook | poster | reckoner
OCR: If There's Time or Need: Bit Operations on the Integer Types 159 00 shortvarl 0000000000010111 shortvar2 0111 atterns shortvarl shortvar2 The decimal value of shor rtvarl shortvar2 is 479 The next bit operation the bitwise xor, carat An xor expression com- bines two other expressions and has the syntax expressi ionl expressi on2 It assigns to the resultant bit if the corresponding bits in the two operands are different and if they are the same The rule condensed in the table below rns to ith bit in th bit in th bit in expressi ionl expression2 axpressionl Kpression2 the For example, consider the bitwise- -xor applied to charvarl and charvar2 with n the the values and respectively. The bit patterns for cha rvarl, charvar2 and charvarl charvar2 are presented below charvarl charvar2 110 charv ...