hello!
First off I don't know if this is the right spot to put this post, but I'm new here so...
My task is to draw a flowchart for a subroutine to convert a 4-bit hexadecimal value to the corresponding 7-bit ASCII-code.
Specification:
Input parameters: Only one, in register r4. The 4 least significant bits in register r4 specify a number, from 0 through 15. The values of all other bits in the input must be ignored.
Return value: Only one, returned in register r2. The 7 least significant bits in register r2 must be an ASCII code as described below. All other bits in the output must be zero.
Required action: Input values 0 through 9 must be converted to the ASCII codes for the digits '0' through '9', respectively. Input values 10 through 15 must be converted to the ASCII codes for the letters 'A' through 'F', respectively.
Side effects: The values in registers r2 through r15 may be changed. All other registers must have unchanged values when the subroutine returns.
I don't know how to begin...
I would be glad if anyone could help me!![]()


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum