Repository navigation
bnme_v1.0.0
🔢 Base-N Magic Explainer - Version 1.0
A numeric base converter developed in MASM 16-bit Assembly
Converts numbers between binary, octal, decimal, and hexadecimal systems
📋 Project Description
Base-N Magic Explainer is a command-line application developed in Assembly that allows you to convert numbers between different numbering systems. This first version implements all basic conversion functionalities without step-by-step explanation (to be included in future versions).
✨ Implemented Features
🎯 Main Functionalities
- ✅ Source base selection: Binary, Octal, Decimal, Hexadecimal
- ✅ Number input: Validation according to the selected base
- ✅ Full conversion: Shows the result in all bases
- ✅ Intuitive navigation: Easy-to-use menus
- ✅ Program information: "About" screen
📊 Supported Bases
| Base | System | Valid Characters | Maximum Capacity |
|---|---|---|---|
| 2 | Binary | 0, 1 |
16 bits |
| 8 | Octal | 0-7 |
~5 digits |
| 10 | Decimal | 0-9 |
65,535 |
| 16 | Hexadecimal | 0-9, A-F, a-f |
8 digits (32 bits) |
🏗️ Code Architecture
📁 Module Structure
code/
├── c1init.asm # 🚀 Main module and initialization
├── c2about.asm # ℹ️ Program information
├── c3chose.asm # 🎛️ Source base selection
├── c4fromB.asm # ⚡ Conversion from Binary
├── c5fromO.asm # 🔶 Conversion from Octal
├── c6fromD.asm # 🔢 Conversion from Decimal
└── c7fromH.asm # 🔷 Conversion from Hexadecimal
🔧 Technical Components
Consistent Naming Pattern
Each conversion module follows a standard pattern:
MAIN_FROM[X]: Main procedureInitializeConvertion[X]: Conversion initializationInputToNum[X]: Input parsing to number[X]PrintNum[Base]: Output functions for each baseBUFFER_[X]IntputNum: Module-specific buffer
Highlighted Technical Features
🔸 32-bit arithmetic: Implemented in c7fromH.asm to handle hexadecimal numbers up to 8 digits
🔸 Robust validation: Each module validates characters according to its corresponding base
🔸 Memory management: Efficient use of shared and specific buffers
🎮 Usage Guide
Typical Workflow
- 🏁 Start: The program displays the main menu
- 📝 Selection: Choose the input number base (2, 8, 10, 16)
- ⌨️ Input: Enter the number to convert
- 🔄 Conversion: The program displays the result in all bases:
- 🔥 Binary
- 🟠 Decimal
- 🟡 Octal
- 🔵 Hexadecimal
- 🔁 Repeat: Option to perform another conversion
Conversion Example
📥 Input: Base 16 → "FF"
📤 Output:
🔥 Binary: 11111111
🟠 Decimal: 255
🟡 Octal: 377
🔵 Hexadecimal: FF
🎯 Known Limitations
| Aspect | Limitation | Future Version |
|---|---|---|
| Step-by-step explanation | ❌ Not implemented | ✅ V2.0 |
| Negative numbers | ❌ Not supported | 🔄 Considering |
| Decimal numbers | ❌ Integers only | 🔄 Considering |
| Custom bases | ❌ Only 2,8,10,16 | 🔄 Evaluating |
🔧 Installation and Execution
Prerequisites
- 🖥️ MASM 6.11 or higher
- 📦 DOS-Box for emulation
- 🛠️ Emu8086 (optional, for debugging)
Installation Steps
-
📂 Location: Place the project in
C:\MASM\masm611\BIN\ -
💿 DOS-Box: Mount the directory
mount c: c:\MASM\masm611\BIN
-
🔨 Compilation:
cd basen\code ML c1init.asm
-
▶️ Execution:c1init.exe
🚀 Improvements Implemented in V1.0
🔷 Hexadecimal Module (c7fromH.asm)
- ✅ 32-bit arithmetic: Handles numbers up to FFFFFFFF
- ✅ Uppercase and lowercase support: A-F and a-f
- ✅ Improved validation: Rejects invalid characters
- ✅ Expanded capacity: From 4 to 8 hexadecimal digits
🔶 Octal Module (c5fromO.asm)
- ✅ Correct base 8 logic: Multiplication by 8 instead of binary logic
- ✅ Specific validation: Only characters 0-7
- ✅ Complete procedures: All print functions implemented
🔢 Decimal Module (c6fromD.asm)
- ✅ Native base 10: Correct multiplication by 10
- ✅ Full range: Numbers up to 65,535
- ✅ 'D' markers: Consistent naming
📊 Project Statistics
| Metric | Value |
|---|---|
| Lines of code | ~1,500+ |
| Modules | 7 |
| Procedures | 25+ |
| Supported bases | 4 |
| Development time | Iterative |
| Language | MASM 16-bit Assembly |
🔮 Future Roadmap
Version 2.0 - Step-by-Step Explanation
- 📚 Implement detailed explanation of the conversion process
- 📖 Show intermediate mathematical operations
- 🎓 Educational mode with examples
Version 2.1 - UX Improvements
- 🎨 More colorful interface
- ⚡ Improved navigation
- 💾 Conversion history
Version 3.0 - Advanced Features
- ➕ Support for negative numbers
- 🔢 Basic arithmetic operations
- 📁 Batch mode for multiple conversions
👨💻 Developer Information
Developed by: A-Cubica-R
V1.0 Release Date: May 2025
License: MIT License
🎉 Acknowledgements
Thanks to the Assembly community and everyone who contributed feedback during the development of this first functional version.
🔢 Base-N Magic Explainer V1.0 - Convert with style! 🔢
"Where numbers find their perfect form"
⭐ Give it a star if you like the project! ⭐