-
Notifications
You must be signed in to change notification settings - Fork 3
/
bits.h
41 lines (40 loc) · 851 Bytes
/
bits.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// 15 problems, 40 points
// 2 - rating 1
// 3 - rating 2
// 7 - rating 3
// 3 - rating 4
// rating 1
int isZero(int);
int test_isZero(int);
int bitAnd(int, int);
int test_bitAnd(int, int);
// rating 2
int fitsBits(int, int);
int test_fitsBits(int, int);
int getByte(int, int);
int test_getByte(int, int);
int isNotEqual(int, int);
int test_isNotEqual(int, int);
int bitXor(int, int);
int test_bitXor(int, int);
int copyLSB(int);
int test_copyLSB(int);
// rating 3
int sum3(int, int, int);
int test_sum3(int, int, int);
int reverseBytes(int);
int test_reverseBytes(int);
int isNegative(int);
int test_isNegative(int);
int isLess(int, int);
int test_isLess(int, int);
// rating 4
int isNonZero(int);
int test_isNonZero(int);
int bitCount(int);
int test_bitCount(int);
int bang(int);
int test_bang(int);
int bitParity(int);
int test_bitParity(int);