A simple C++ program to convert between decimal and binary numbers.
- Convert decimal numbers (0-255) to 8-bit binary representation.
- Convert 8-bit binary numbers to decimal representation.
- Input validation to ensure correct number formats.
-
Clone the repository:
git clone https://github.com/AyuExecutes/BinaryDecimalConverter -
Compile the program:
g++ BinaryDecimalConverter.cpp -o BinaryDecimalConverter -
Run the program:
./BinaryDecimalConverter -
Follow the prompts to enter a number and see the conversion results.
Example:Enter a number: 20 Converting decimal to binary... The result is 0001 0100 Enter a number: 00010100 Converting binary to decimal... The result is 20