Skip to content

πŸ”„ Smart Data Converter - C++ utility for data unit conversion (Byte to Yottabyte) and binary/decimal conversion. Interactive console interface

Notifications You must be signed in to change notification settings

Amr4924/SmartDataConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”„ Smart Data Converter v2.0

License: MIT C++ Platform Build Status## πŸš€ Version History

  • v2.0 - Enhanced Professional Release

    • Corrected application branding and messaging to match actual functionality
    • Professional welcome screen with accurate feature descriptions
    • Complete code documentation with comprehensive headers
    • Optimized user interface with consistent styling
    • Enhanced README documentation with detailed examples
    • Clean project structure with organized file management
  • v1.0 - Initial release with enhanced UI and comprehensive conversion features

    • Professional menu system implementation
    • Complete documentation and code comments
    • Bidirectional unit conversion support
    • Social media integration

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 Amr Saadawy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

πŸ“Š Project Stats

GitHub Stars GitHub Forks GitHub Issueslatform](https://img.shields.io/badge/Platform-Windows-lightgrey.svg)](https://www.microsoft.com/windows) Build Status

πŸ“‹ Overview

Smart Data Converter is a professional console-based utility for converting data units and number systems. Built with modern C++ and featuring an elegant user interface, it provides an intuitive experience for bidirectional conversions between various storage units and number base conversions.

🎯 Key Highlights

  • Professional UI Design - Elegant menu system with styled borders
  • Comprehensive Documentation - Fully commented code with professional headers
  • Modular Architecture - Clean separation of concerns across multiple files
  • Error Handling - Robust input validation and user-friendly error messages

✨ Features

🎨 Enhanced User Interface

  • Professional Welcome Screen - Branded application header with feature highlights
  • Styled Menu System - Consistent | >>[option] | format throughout the application
  • Dynamic Menu Functions - Specialized display functions for different contexts:
    • welcome() - Main application welcome screen
    • Menu() - Generic menu display with professional borders
    • MenuUnits() - Unit selection interface
    • MenuConvert() - Conversion options display
  • Clear Navigation - Screen clearing and organized flow for optimal user experience

πŸ”’ Number System Conversion

  • Decimal to Binary - Convert decimal numbers to binary representation with step-by-step display
  • Binary to Decimal - Convert binary strings to decimal numbers with validation
  • Algorithm Implementation - Custom division method for accurate binary conversion

πŸ’Ύ Advanced Data Unit Conversion

  • Bidirectional Conversion - Support for both large-to-small and small-to-large unit conversions
  • Complete Unit Range - Full spectrum from Bytes to Yottabytes (9 unit levels)
  • Precision Calculations - Uses 1024-base conversion (binary standard) with custom power functions
  • Interactive Selection - Step-by-step unit selection with validation
  • Supported Units:
    • Large to Small: YB β†’ ZB β†’ EB β†’ PB β†’ TB β†’ GB β†’ MB β†’ KB β†’ B
    • Small to Large: KB β†’ MB β†’ GB β†’ TB β†’ PB β†’ EB β†’ ZB β†’ YB

🎯 Professional User Experience

  • Welcome Message System - Branded introduction with application overview
  • Input Validation - Comprehensive error handling with user-friendly messages
  • Loop Operation - Continue/exit options for multiple conversions
  • Professional Farewell - Elegant exit screen with developer contact information
  • Social Media Integration - Automatic browser launch for developer profiles

πŸš€ Quick Start

Prerequisites

  • C++ compiler (g++, MinGW, or Visual Studio)
  • Windows operating system

Compilation

# Standard compilation
g++ -o SmartDataConverter main.cpp convert.cpp SmallUnits.cpp

# With optimization flags
g++ -O2 -o SmartDataConverter main.cpp convert.cpp SmallUnits.cpp -std=c++11

Running the Program

# Execute the program
./SmartDataConverter.exe

# Or simply double-click the executable file

πŸ“ Project Architecture

SmartDataConverter/
β”œβ”€β”€ πŸ“„ main.cpp              # Main application with enhanced UI and control flow
β”œβ”€β”€ πŸ“„ convert.h             # Comprehensive header with all function declarations
β”œβ”€β”€ πŸ“„ convert.cpp           # Core conversion functions and menu display systems
β”œβ”€β”€ πŸ“„ SmallUnits.cpp        # Small-to-large unit conversion implementations
β”œβ”€β”€ πŸ“„ README.md             # Complete project documentation
β”œβ”€β”€ πŸ“‚ .git/                 # Git version control
β”œβ”€β”€ πŸ“‚ .vscode/              # VS Code workspace settings
└── πŸš€ SmartDataConverter.exe # Production-ready executable

πŸ—οΈ Code Organization

  • Modular Design - Separation of concerns across multiple files
  • Professional Documentation - Comprehensive inline comments and function headers
  • Header Guards - Proper include protection in header files
  • Namespace Management - Clean use of standard namespace

πŸ’‘ Usage Examples

🎨 Enhanced Interface Preview

|-------------------------------------------------------|
|            Welcome to SmartDataConverter              |
|_______________________________________________________|
|                                                       |
| >> SmartDataConverter helps you convert data units  <<|
|                                                       |
|  >> Convert between storage units (KB, MB, GB...).    |
|  >> Transform decimal numbers to binary format.       |
|                                                       |
| >> Fast, accurate, and professional conversion tool <<|
|                                                       |
|_______________________________________________________|
|                        Menu                           |
|-------------------------------------------------------|
|                                                       |
| >>>> [1] Convert decimal and binary numbers.          |
| >>>> [2] Unit conversion.                             |
|                                                       |
|_______________________________________________________|
 ......>> Please select an option <<......
>:

πŸ”’ Number System Conversion

Input: 10 (decimal)
Output: The number (10) after conversion to binary : 1 0 1 0

Input: 1010 (binary)  
Output: 10 (decimal)

πŸ’Ύ Data Unit Conversion Examples

Large to Small Conversion:
Input: 1 GB
Output: 1024 MB

Small to Large Conversion:
Input: 1024 KB
Output: 1 MB

Multi-level Conversion:
Input: 1 TB
Output: 1,099,511,627,776 Bytes

πŸ› οΈ Technical Implementation

πŸ’» Programming Details

  • Language: C++ (Standard: C++11 or higher)
  • Architecture: Object-oriented modular design
  • Memory Management: Efficient vector usage for dynamic storage
  • Error Handling: Comprehensive input validation and exception handling

πŸ”§ Key Functions

  • Menu System: welcome(), Menu(), MenuUnits(), MenuConvert()
  • Conversion Algorithms:
    • DecimalToBinary() - Division-based binary conversion
    • BinaryToDecimal() - Positional notation conversion
    • units() - Large-to-small unit conversion
    • smallunits() - Small-to-large unit conversion
  • Utility Functions: powr() - Custom power calculation for precision

⚑ Performance Features

  • Custom Power Function - Optimized iterative calculation instead of library calls
  • Efficient Algorithms - Minimal time complexity for all conversions
  • Memory Optimization - Smart use of vectors and string handling

πŸ“Š Conversion Chart

Unit Abbreviation Bytes
Byte B 1
Kilobyte KB 1,024
Megabyte MB 1,048,576
Gigabyte GB 1,073,741,824
Terabyte TB 1,099,511,627,776
Petabyte PB 1,125,899,906,842,624
Exabyte EB 1,152,921,504,606,846,976
Zettabyte ZB 1,180,591,620,717,411,303,424
Yottabyte YB 1,208,925,819,614,629,174,706,176

🀝 Contributing

We welcome contributions! Here's how you can help improve Smart Data Converter:

πŸ”„ Development Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ’‘ Contribution Ideas

  • Additional number systems (Octal, Hexadecimal)
  • GUI implementation using Qt or other frameworks
  • Unit tests for all conversion functions
  • Cross-platform compatibility improvements

πŸ‘¨β€πŸ’» Developer

Amr Saadawy - Full Stack Developer & C++ Enthusiast

🌐 Connect With Me

πŸ“§ Contact Information

οΏ½ Acknowledgments

  • C++ Community - For excellent documentation and best practices
  • Open Source Contributors - Inspiration from various conversion utilities
  • Educational Focus - Built to help students understand data conversion concepts
  • Professional Development - Showcasing clean code practices and documentation

οΏ½ Version History

  • v1.0 - Initial release with enhanced UI and comprehensive conversion features
    • Professional menu system implementation
    • Complete documentation and code comments
    • Bidirectional unit conversion support
    • Social media integration

πŸ“Š Project Stats

GitHub Stars GitHub Forks GitHub Issues


⭐ Star this repository if you found it helpful! ⭐

Made with ❀️ by Amr Saadawy

Professional C++ Development | Clean Code Advocate | Open Source Contributor

About

πŸ”„ Smart Data Converter - C++ utility for data unit conversion (Byte to Yottabyte) and binary/decimal conversion. Interactive console interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages