摘要: 位操作有:按位与、按位或、按位异或、按位取反、左移、带符号右移和无符号右移。 1、按位与(&或者and): 2&3 = 0000 0010 & 0000 0011 = 0000 0010 = 2 2、按位或(|或者or): 2|3 = 0000 0010 | 0000 0011 = 0000 001 阅读全文
posted @ 2018-06-29 18:12 insistYuan 阅读(347) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { int result[100]; int num, i = 0, j; printf("Please enter a number :\n"); scanf("%d", &num); while(num) { result[i++] = num % 2; num =... 阅读全文
posted @ 2018-06-29 17:07 insistYuan 阅读(258) 评论(0) 推荐(0) 编辑