bit number formatting and recombining | Cypress Semiconductor
bit number formatting and recombining
This may be simpler than I think it is, but I just do not remember how to do this and could not find other topics.
I have an int16. I print the value on UART display. I want to format that into two int8 (maybe an array) and print them again on UART, then later on, recombine the two int8 into one and print the value again. The combined value of the two int8 would be the original int16. How would I do this?
I imagine it would require some bit shifting, but I just cannot remember how to do this.