1. 首页
  2. 课程学习
  3. C++/C
  4. c语言或者c++ :Bit manipulations 位操作

c语言或者c++ :Bit manipulations 位操作

上传者: 2018-12-11 09:44:21上传 C文件 867B 热度 33次
Define an unsigned long integer and initialise it to the binary pattern: 0101 1111 0001 1000 1001 0010 1101 0011 Using hexadecimal notation print the hex value on the console. Write a function to print a long integer on the console in hex and binary form. Now perform the following operations on the pattern and print out the results of each operation in hex and binary format. Right shift the binary pattern by 4 bits. Left shift the pattern by 6 bits. AND the value with the long int 0x3 AND the value with the char 0x3 OR the value with the unsigned short 0xf00f Exclusive OR the value with the long int 0xF0F0F0F0
用户评论