Number System Converter is a beginner-friendly Python program that allows users to convert numbers between different numeral systems: binary, decimal, octal, and hexadecimal. It features a simple menu-driven interface where users can choose the type of conversion they want and enter a number in the corresponding format.
The program supports the following conversions:
- Binary → Decimal, Octal, Hexadecimal
- Decimal → Binary, Octal, Hexadecimal
- Octal → Binary, Decimal, Hexadecimal
- Hexadecimal → Binary, Decimal, Octal
Each conversion is handled by a dedicated function that:
- Takes user input
- Validates the input using a
try-except
block to prevent crashes - Converts the number to decimal using Python’s built-in
int()
function with the appropriate base - Then converts the decimal to the other number systems using the
format()
function
After each conversion, the user is prompted whether they want to continue using the tool or exit the program.
This project is great for:
- Practicing basic Python
- Understanding numeral systems
- Learning how to structure interactive command-line programs
- Easy-to-use text-based interface
- Input validation with helpful error messages
- Support for uppercase/lowercase hexadecimal inputs
- Runs continuously until the user decides to exit
- Clean, modular functions for each conversion type