IN C++ Clear Hex Digit (c command) Complete the clearHexDigit() function, so that it accepts a digit
Question:
IN C++
Clear Hex Digit (‘c’ command) Complete the clearHexDigit() function, so that it accepts a digit position (0-7) from the user and sets the bits for that digit to zero.
SAMPLE-Enter single-letter command (or 'h' for help): c Original data value (hex) = 12349678 Enter digit number (count from the right, begin at zero): 5 Modified data value (hex) = 12049678 Decimal: 302290552 Octal: 2201113170 Hex: 12049678 Binary:
Define New Value for Hex Digit (‘d’ command) Complete the defineNewValueForHexDigit () function, so that it accepts a digit position (0-7) from the user and sets the bits for that digit to the new hex value entered by the user
SAMPLE=Enter single-letter command (or 'h' for help): d Original data value (hex) = FFFFFFFF Enter digit number (count from the right, begin at zero): 3 Enter desired new value (hex): 4 Modified data value (hex) = FFFF4FFF
Financial Analysis with Microsoft Excel
ISBN: 978-1285432274
7th edition
Authors: Timothy R. Mayes, Todd M. Shank