i have to create a program that separates 2 decimal digits. For example, the number 89 would become number 8 and 9 on two separate outputs. Number 8 would be multiplied by 16 and then 9 would be added for the converted binary value.
i am using this program with seven segment display. Im new to programming so any ideas how i may start?
The only thing you would need to know is the % (modulo) operator. It gives you the remainder of division, so 89 %10 would give you 9, and then you could subtract 9 from 89 and divide the resulting 80 by 10 to get 8. ;)