I wanna create a custom data type which uses 5 bits. Max value is 20 (10100) and min value is 0 (00000). I couldn't imagine how could I accomplish that. So I decided ask your helps...
And it should do arithmetics like:
note n = 15;
note x = 5;
std::cout << n + x << std::endl; //Should print 20
std::cout << n-x << std::endl; //Should print 10
Regards & thanks for your efforts!..