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 / 161.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-21  |  722KB  |  2550x3300
Labels: book | crt screen | reckoner
OCR: Time or Need: Bit Operations uo the Integer Types 161 3.8 If There's As another example, suppose that shortvar2 has the value 10 549 which has the corresponding bit pattern shortvar2 The following shifts have the illustrated results. Shift Bit pattern Value shor tvar2 5274 tly shortvar2 1318 shortvar2 21098 shortvar2 18856 Note that in a right any is at the right end of the bit pattern are shifted off the end and discarded. bits at the left end ofthe word are filled in with Os. Simi larly in left shift, the bits at the left end of the word are shifted out and discarded. The bits at the right end of the word become Os The shifting is done to the bit pat- terns: the interpretation of those bit patterns depends on the type of the expression. For example, ifa shifted into the leftmost bit a pr ...