Browse Source

Finish isTmax and Update README.MD

main
邓博昊 8 months ago
parent
commit
a2d6e78f21
2 changed files with 8 additions and 1 deletions
  1. +6
    -1
      LAB1/bits.c
  2. +2
    -0
      README.md

+ 6
- 1
LAB1/bits.c View File

@ -198,7 +198,12 @@ int tmin(void) {
* Rating: 1
*/
int isTmax(int x) {
return 2;
int i =x+1;
x = x+i;
x = ~x;
i = !i;
x = x+i;
return !x;
}
/*
* allOddBits - return 1 if all odd-numbered bits in word set to 1

+ 2
- 0
README.md View File

@ -7,3 +7,5 @@ A CSAPP LAB
2. Finish bitXor
3. Finish tmin

Loading…
Cancel
Save