lab-03-Rushilwiz/bit_utils.c
github-classroom[bot] c483dc942d
Initial commit
2024-02-28 21:23:38 +00:00

39 lines
916 B
C

// PID: 9DigitPidNoSpacesOrDashes
// I pledge the COMP 211 honor code.
/**
* DO NOT define a main function in this file!
* This file is intended to be a library file, so a main function here
* will conflict with the main function in test.c (our "runner" file)
* To test your functions, write tests in test.c
*/
#include "bit_utils.h"
unsigned int mask(unsigned int num, unsigned int bits) {
// TODO: implement
return 0;
}
unsigned int set(unsigned int num, unsigned int bits) {
// TODO: implement
return 0;
}
unsigned int inverse(unsigned int num, unsigned int bits) {
// TODO: implement
return 0;
}
unsigned int bit_select(unsigned int num,
unsigned int startbit,
unsigned int endbit) {
// TODO: implement
return 0;
}
unsigned int barrel_shift(unsigned int num, unsigned int shamt) {
// TODO: implement
return 0;
}