Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Practical C++ programming - Chapter 11: Bit operations

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

This chapter presents the various bit operators. This chapter is a complete unit in itself and can be safely skipped. There are two practical uses for bit operators. First, we show how to put eight single bit flags in one byte. Secondly, we demonstrate simple bitmapped graphics. | Chapter - 11 Bit operations Practical C Programming Copyright 2003 O Reilly and Associates Page 1 Binary Numbers Almost all machines organize their memory into 8 bit bytes. This means that a single location can hold 8 binary digits bits such as 01100100 Hex Binary Hex Binary 0 0000 8 1000 1 0001 9 1001 2 0010 A 1010 3 0011 B 1011 4 0100 C 1100 5 0101 D 1101 6 0110 E 1110 7 0111 F 1111 Example 0xAF 1010 1111 binary . Practical C Programming Copyright 2003 O Reilly and Associates Page 2 Bit Operators Operator Meaning Bitwise and I Bitwise or A Bitwise exclusive or Complement Shift left Shift right Practical C Programming Copyright 2003 O Reilly and Associates Page