This website works better with JavaScript.
Home
Explore
帮助
返回水杉在线
登录水杉在线
登录水杉码园
10215501411
/
Computer-Systems-Labs
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
finish quize 2-3
master
吴冕志
3 years ago
parent
aeb02df000
commit
e0ff8bb551
1 changed files
with
7 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-3
lab2/datalab-handout/bits.c
+ 7
- 3
lab2/datalab-handout/bits.c
View File
@ -159,8 +159,9 @@ int bitXor(int x, int y) {
*
Rating
:
1
*/
int
tmin
(
void
)
{
return
2
;
int
one
=
1
;
int
res
=
one
<
<
31
;
return
res
;
}
/
/
2
@ -172,7 +173,10 @@ int tmin(void) {
*
Rating
:
1
*/
int
isTmax
(
int
x
)
{
return
2
;
int
xplusone
=
x
+
1
;
int
all1
=
xplusone
^
x
;
int
allzero
=
all1
+
1
;
return
!
allzero
;
}
/*
*
allOddBits
-
return
1
if
all
odd
-
numbered
bits
in
word
set
to
1
Write
Preview
Loading…
Cancel
Save