{"id":17382137,"url":"https://github.com/mecaneer23/binarytodecimal","last_synced_at":"2026-01-27T22:37:23.337Z","repository":{"id":41427490,"uuid":"385284214","full_name":"mecaneer23/BinarytoDecimal","owner":"mecaneer23","description":"Binary to decimal converters in numerous languages. Designed as a learning tool to compare common concepts across programming languages.","archived":false,"fork":false,"pushed_at":"2024-07-28T17:11:37.000Z","size":161,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T19:51:19.970Z","etag":null,"topics":["ada","bash","batch","bin2dec","binary-to-decimal","binary-to-decimal-number-converter","c","coffeescript","cpp","forth","haskell","programming-languages","python","scala","swift"],"latest_commit_sha":null,"homepage":"http://mecaneer23.net/BinarytoDecimal/","language":"Python","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/mecaneer23.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":"2021-07-12T14:55:08.000Z","updated_at":"2024-07-28T17:11:41.000Z","dependencies_parsed_at":"2024-02-10T06:21:13.555Z","dependency_job_id":"93772c9a-ee3d-4935-9181-0245c7c93aea","html_url":"https://github.com/mecaneer23/BinarytoDecimal","commit_stats":{"total_commits":197,"total_committers":5,"mean_commits":39.4,"dds":0.5025380710659899,"last_synced_commit":"e67dd5c2573cacab91b94f1e0508f83e34fc71b4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecaneer23%2FBinarytoDecimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecaneer23%2FBinarytoDecimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecaneer23%2FBinarytoDecimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecaneer23%2FBinarytoDecimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mecaneer23","download_url":"https://codeload.github.com/mecaneer23/BinarytoDecimal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245878929,"owners_count":20687297,"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":["ada","bash","batch","bin2dec","binary-to-decimal","binary-to-decimal-number-converter","c","coffeescript","cpp","forth","haskell","programming-languages","python","scala","swift"],"created_at":"2024-10-16T07:35:38.232Z","updated_at":"2026-01-27T22:37:23.332Z","avatar_url":"https://github.com/mecaneer23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BinarytoDecimal\r\n\r\n![Screenshot](screenshot.png)\r\n\r\nBinary to decimal converters in many languages\r\n\r\n## File endings error\r\n\r\nResolve by opening the file in question in vim and running the following command\r\n\r\n```vim\r\n:set ff=unix\r\n```\r\n\r\n## Current languages (53)\r\n\r\n| Language                       |                                        |                                        |                                    |                                   |                                 |                                  |                                    |\r\n| ------------------------------ | -------------------------------------- | -------------------------------------- | ---------------------------------- | --------------------------------- | ------------------------------- | -------------------------------- | ---------------------------------- |\r\n| [Ada](BinarytoDecimal.adb)     | [CoffeeScript](BinarytoDecimal.coffee) | [F#](BinarytoDecimal.fsx)              | [Haskell](BinarytoDecimal.hs)      | [Nim](BinarytoDecimal.nim)        | [Python](BinarytoDecimal.py)    | [Scala](BinarytoDecimal.scala)   | [Vala](BinarytoDecimal.vala)       |\r\n| [Bash](BinarytoDecimal.sh)     | [Common Lisp](BinarytoDecimal.lsp)     | [Fantom](BinarytoDecimal.fan)          | [Java](BinarytoDecimal.java)       | [Objective-C](BinarytoDecimal.m)  | [R](BinarytoDecimal.r)          | [Scheme](BinarytoDecimal.scm)    | [Vimscript](BinarytoDecimal.vim)   |\r\n| [Batch](BinarytoDecimal.bat)   | [Crystal](BinarytoDecimal.cr)          | [Forth](BinarytoDecimal.fth)           | [Java Blocks](BinarytoDecimal.blk) | [OCaml](BinarytoDecimal.ml)       | [Racket](BinarytoDecimal.rkt)   | [Scratch](BinarytoDecimal.sb3)   | [Visual Basic](BinarytoDecimal.vb) |\r\n| [C](BinarytoDecimal.c)         | [D](BinarytoDecimal.d)                 | [Fortran](BinarytoDecimal.f90)         | [JavaScript](BinarytoDecimal.js)   | [Pascal](BinarytoDecimal.pas)     | [Reason](BinarytoDecimal.re)    | [Swift](BinarytoDecimal.swift)   | [Zig](BinarytoDecimal.zig)         |\r\n| [C#](BinarytoDecimal.cs)       | [Dart](BinarytoDecimal.dart)           | [Gadot (GDScript)](BinarytoDecimal.gd) | [Julia](BinarytoDecimal.jl)        | [Perl](BinarytoDecimal.pl)        | [Rescript](BinarytoDecimal.res) | [Tcl](BinarytoDecimal.tcl)       |\r\n| [C++](BinarytoDecimal.cpp)     | [DogeScript](BinarytoDecimal.djs)      | [Go](BinarytoDecimal.go)               | [Kotlin](BinarytoDecimal.kt)       | [PHP](BinarytoDecimal.php)        | [Ruby](BinarytoDecimal.rb)      | [TypeScript](BinarytoDecimal.ts) |\r\n| [Clojure](BinarytoDecimal.clj) | [Elixir](BinarytoDecimal.exs)          | [Groovy](BinarytoDecimal.gvy)          | [Lua](BinarytoDecimal.lua)         | [Powershell](BinarytoDecimal.ps1) | [Rust](BinarytoDecimal.rs)      | [V](BinarytoDecimal.v)           |\r\n\r\n## Libraries and tools using BinarytoDecimal in existing languages\r\n\r\n| Library or tool                                   | Parent language                  |\r\n| ------------------------------------------------- | -------------------------------- |\r\n| [Bitsbox](BinarytoDecimal.bitsbox.js)             | [JavaScript](BinarytoDecimal.js) |\r\n| [CSS](BinarytoDecimal.css)                        | [HTML](BinarytoDecimal.html)     |\r\n| [HTML](BinarytoDecimal.html)                      | [JavaScript](BinarytoDecimal.js) |\r\n| [Haskell Style](BinarytoDecimal.haskell_style.py) | [Python](BinarytoDecimal.py)     |\r\n| [Tkinter](BinarytoDecimal.tkinter.py)             | [Python](BinarytoDecimal.py)     |\r\n| [Jupyter Notebook](BinarytoDecimal.ipynb)         | [Python](BinarytoDecimal.py)     |\r\n| [One line](BinarytoDecimal.one_line.py)           | [Python](BinarytoDecimal.py)     |\r\n\r\n## Algorithm (when applicable)\r\n\r\n```pseudocode\r\nfunction BinarytoDecimal(int binaryNumber) -\u003e int {\r\n    constant string value = integer_to_string(binaryNumber)\r\n    constant int length = length(value)\r\n    variable int output = 0\r\n    variable int position\r\n    for 0 to length using position {\r\n        variable character chr = char_from_string(value, position)\r\n        if chr is '1' {\r\n            output += 2^(length-1-position)\r\n        } else if chr is '0' {\r\n            continue loop\r\n        } else {\r\n            print(\"Make sure you only input binary values\")\r\n            exit(-1)\r\n        }\r\n    }\r\n    return output\r\n}\r\n\r\nfunction starting_point(void) -\u003e void {\r\n    print(\"Binary Number: \")\r\n    print(\r\n        BinarytoDecimal(\r\n            string_to_integer(\r\n                get_user_input\r\n            )\r\n        )\r\n    )\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmecaneer23%2Fbinarytodecimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmecaneer23%2Fbinarytodecimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmecaneer23%2Fbinarytodecimal/lists"}