SetBit function that sets the bit of a given integer by doing a bitwise OR and using left shift
void SetBit(unsigned int& v, int bitNo, bool val){
if(val == true){
v = (1<<(bitNo - 1) | v;
}
else{
v = ~(1<<(bitNo-1)) & v;
}
}
void SetBit(unsigned int& v, int bitNo, bool val){
if(val == true){
v = (1<<(bitNo - 1) | v;
}
else{
v = ~(1<<(bitNo-1)) & v;
}
}