Browse Source

Finish isTmax and allOddBits

main
邓博昊 1 year ago
parent
commit
19690ae02a
2 changed files with 6 additions and 1 deletions
  1. +2
    -1
      LAB1/bits.c
  2. +4
    -0
      README.md

+ 2
- 1
LAB1/bits.c View File

@ -214,7 +214,8 @@ int isTmax(int x) {
* Rating: 2
*/
int allOddBits(int x) {
return 2;
int a = 0xaaaaaaaa;
return !((a&x)^a);
}
/*
* negate - return -x

+ 4
- 0
README.md View File

@ -9,3 +9,7 @@ A CSAPP LAB
3. Finish tmin
### 2023/10/8 Update:
1. Finish isTmax
2. Finish allOddBits

Loading…
Cancel
Save