|
|
|
@ -23,6 +23,12 @@ uint8_t jun_nibble(uint8_t i) //Extracting the junior Nibble
|
|
|
|
|
return i & 0x0f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t sen_nibble(uint8_t i) //Extracting the senior Nibble
|
|
|
|
|
{
|
|
|
|
|
return (i & 0xf0) >> 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
@ -47,6 +53,7 @@ int main()
|
|
|
|
|
cout << nibble_to_hex(10) << endl;
|
|
|
|
|
//cout << hex << static_cast(jun_nibble(0xce)) << endl;
|
|
|
|
|
cout << "Junior nibble: " << hex << +jun_nibble(0xce) << endl; //junior nibble
|
|
|
|
|
cout << "Senior nibble: " << hex << +sen_nibble(0xce) << endl; //senior nibble
|
|
|
|
|
|
|
|
|
|
cout << "Press any key for exit... ";
|
|
|
|
|
cin.get();
|
|
|
|
|