{"id":26417808,"url":"https://github.com/lumarans30/dec2bin-rust","last_synced_at":"2025-03-18T01:16:09.360Z","repository":{"id":248761467,"uuid":"829672631","full_name":"LuMarans30/dec2bin-rust","owner":"LuMarans30","description":"Three simple algorithms in Rust that convert a number from decimal to binary. ","archived":false,"fork":false,"pushed_at":"2024-08-22T14:32:38.000Z","size":85,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-23T11:29:32.533Z","etag":null,"topics":["big-int","conversion","decimal-to-binary","rust"],"latest_commit_sha":null,"homepage":"https://lumarans30.github.io/dec2bin-rust","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuMarans30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T22:24:56.000Z","updated_at":"2024-08-22T14:32:41.000Z","dependencies_parsed_at":"2024-08-21T03:15:24.844Z","dependency_job_id":null,"html_url":"https://github.com/LuMarans30/dec2bin-rust","commit_stats":null,"previous_names":["lumarans30/dec2bin-rust","lumarans30/three-version-decimal-to-binary-in-rust"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuMarans30%2Fdec2bin-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuMarans30%2Fdec2bin-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuMarans30%2Fdec2bin-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuMarans30%2Fdec2bin-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuMarans30","download_url":"https://codeload.github.com/LuMarans30/dec2bin-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135911,"owners_count":20403798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["big-int","conversion","decimal-to-binary","rust"],"created_at":"2025-03-18T01:16:08.367Z","updated_at":"2025-03-18T01:16:09.358Z","avatar_url":"https://github.com/LuMarans30.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Decimal to Binary Converter in Rust\n\n![GitHub](https://img.shields.io/github/license/LuMarans30/dec2bin-rust)\n![GitHub repo size](https://img.shields.io/github/repo-size/LuMarans30/dec2bin-rust)\n![GitHub issues](https://img.shields.io/github/issues/LuMarans30/dec2bin-rust)\n![GitHub last commit](https://img.shields.io/github/last-commit/LuMarans30/dec2bin-rust)\n\nA simple Rust implementation of a decimal to binary converter, inspired by my previous [C version](https://github.com/LuMarans30/three-version-decimal-to-binary). \nI'm using this project to learn Rust and explore its features.\n\n## Overview\n\nThis project provides a basic CLI for converting decimal numbers to their binary representations.\n\n## Usage\n\nTo use this tool, run it from the command line:\n```bash\ncargo run [optional_decimal_number]\n```\n\nAlternatively, [precompiled binaries for most platforms](https://github.com/LuMarans30/dec2bin-rust/releases/latest) are available.\n\n## Conversion Methods\n\n1. **Iterative**: Uses a loop to perform the conversion. It divides the decimal number by 2 iteratively and gets the remainder.\n2. **Recursive**: Same algorithm as iterative method, but recursively.\n3. **Lookup Table**: Uses a lookup table that contains all possible 4-bit binary strings for faster conversion (generally the fastest method).\n\n## Features\n\n- Supports conversion of large numbers using the `num_bigint` crate\n- Measures and displays the mean time taken for N iterations for each conversion method.\n\nIf you provide a decimal number as an argument, the program will use that for conversions. Otherwise, it will prompt you to enter a number.\n\n## Contributing\n\nThis project was created as a learning exercise. While it's primarily for personal use, suggestions and improvements are welcome. Feel free to open an issue or submit a pull request if you have ideas to enhance its functionality.\n\n## License\n\nThis project is open-source and available under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flumarans30%2Fdec2bin-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flumarans30%2Fdec2bin-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flumarans30%2Fdec2bin-rust/lists"}