This program converts user input as follows:
- Hex to Binary
- Binary to Hex
- Decimal to Binary
- Binary to Decimal I built the program manually so the program does not use conversion methods like bin() and hex(). In doing so, it provides a view showing how the program actually works.
- Menu-driven interface
- Full user input validation
- Fully manual calculations without using conversion methods
The binary to hex converter was one of the harder ones to build. Since binary is read as 4 bits, the program first makes sure the input is divisible by 4. Doing so confirms that there are complete nibbles in the input. If it is not divisible by 4, there is not a complete nibbles. The program adds the correct amount of 0's needed to finish the last nibble. Then it takes groups of 4 and splits them to properly calculate the nibbles hex value.
It taught me a good deal of patience. Many beginners errors were in there which took time to fix.
User Input validation is not as hard as my brain makes it out to be. It's simple once you slowly process everything in your brain.
Open terminal and run python project.py after changing directory