01:198:211 Lecture 9: Bit Operations

114 views2 pages

Document Summary

Cs211-lecture 9-bit operations: bit-shift operations, shifting a binary value left or right. Shifting left means you move all bits one bit to the left. The operator for bit shifts is x << n or x >> n, where x is the binary number and n is the number of bits to shift. The arrows indicate the direction of the shift. 0xff: note that 0xff represents an 8 bit bit string that is completely positive, this operation makes all bits aside from the desired outcome, issues with binary representation negative, binary numbers sometimes have difficulty representing decimal numbers. For example, 0. 1 in decimal is equal to 0. 0011001100110011 (ad infinitum) in binary: there are two ways of representing zero with binary numbers in computers that practice two"s complement: one with the 1 at the left, and one without. Incrementing a character can change its actual value.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions