Skip to content

AyuExecutes/BinaryDecimalConverter

Repository files navigation

BinaryDecimalConverter

A simple C++ program to convert between decimal and binary numbers.

Features

  • 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.

Usage

  1. Clone the repository:
    git clone https://github.com/AyuExecutes/BinaryDecimalConverter

  2. Compile the program:
    g++ BinaryDecimalConverter.cpp -o BinaryDecimalConverter

  3. Run the program:
    ./BinaryDecimalConverter

  4. 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  
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages