Deze website werkt beter met JavaScript.
Beginscherm
Verkennen
帮助
返回水杉在线
登录水杉在线
登录水杉码园
10215501411
/
Computer-Systems-Labs
Volgen
1
Ster
0
Vork
0
Code
Kwesties
0
Pull-aanvragen
0
Publicaties
0
Wiki
Activiteit
Bladeren bron
fix quiz3
master
吴冕志
1 jaar geleden
bovenliggende
e0ff8bb551
commit
37224203c1
1 gewijzigde bestanden
met
toevoegingen van 2
en
1 verwijderingen
Zij-aan-zij weergave
Diff opties
Statistieken weergeven
Download Patch-bestand
Download Diff-bestand
+2
-1
lab2/datalab-handout/bits.c
+ 2
- 1
lab2/datalab-handout/bits.c
Bestand weergeven
@ -176,7 +176,8 @@ int isTmax(int x) {
int
xplusone
=
x
+
1
;
int
all1
=
xplusone
^
x
;
int
allzero
=
all1
+
1
;
return
!
allzero
;
int
notnegative1
=
!
(
x
^
(
-
1
)
)
;
return
!
(
allzero
|
notnegative1
)
;
}
/*
*
allOddBits
-
return
1
if
all
odd
-
numbered
bits
in
word
set
to
1
Schrijf
Voorbeeld
Laden…
Annuleren
Opslaan