Skip to main content

binaryConverter — Number Base Converter

PyPI version License: MIT GitHub stars

Convert between decimal, binary, hexadecimal and octal — all at once, in one command. Available as both a Python CLI tool and a Bash script.


✨ Features

  • 🔄 All bases at once — enter a number in any base, see DEC / BIN / HEX / OCT simultaneously
  • 🔍 Auto-detection — prefix-based input: 255, 0b1010, 0xFF, 0o17
  • ♾️ Continuous loop — convert multiple numbers without restarting
  • 📋 Clipboard support — result copied automatically (xclip, xsel or pbcopy)
  • 🖥️ Two versions — Python (numbase) and Bash (binaryConverter.sh)

📥 Installation

Python (recommended)

pip install numbase-converter

Bash

git clone https://github.com/serber1990/binaryConverter.git
chmod +x binaryConverter/bash/binaryConverter.sh
./binaryConverter/bash/binaryConverter.sh

🛠 Usage

Interactive mode

numbase
  ╔══════════════════════════╗
  ║  Number Base Converter   ║
  ╚══════════════════════════╝

  Accepts:  255   0b1010   0xFF   0o17   ·   q to quit

  > 255

  ╭──────────────────────╮
  │  DEC  255            │
  │  BIN  1111 1111      │
  │  HEX  FF             │
  │  OCT  377            │
  ╰──────────────────────╯
  ✔  Copied: 11111111

One-shot mode

numbase 255
numbase 0xFF
numbase 0b11001010
numbase 0o377

Copy a specific format

numbase 255 --copy hex     # copies FF to clipboard
numbase 0xFF --copy dec    # copies 255 to clipboard

🎨 Input formats

Format Example Description
Decimal 255 Plain number
Binary 0b11111111 Prefix 0b or 0B
Hexadecimal 0xFF Prefix 0x or 0X
Octal 0o377 Prefix 0o or 0O

🗂 Repository structure

binaryConverter/
├── numbase.py          Python CLI (pip-installable as numbase)
├── bash/
│   └── binaryConverter.sh   Bash version
└── python/
    └── binaryConverter.py   Compatibility shim → numbase

📝 License

MIT — see LICENSE.


💬 Feedback

Open an issue or reach out via GitHub.

🌐 Connect

GitHub

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numbase_converter-2.0.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numbase_converter-2.0.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file numbase_converter-2.0.0.tar.gz.

File metadata

  • Download URL: numbase_converter-2.0.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for numbase_converter-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1c82dd0202f31b5b311f1f89e912cbb5b7d19267c1b426d111df6167f12013b2
MD5 fb639397aaab434c314054589c22a071
BLAKE2b-256 9bccd97ad75e0bce889afe9b906e02a9df6f30136183dac312fb4fee7de58ad5

See more details on using hashes here.

File details

Details for the file numbase_converter-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for numbase_converter-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a03841d81f4ab323206541a7e4fa2d974f04e6aea3a1e9311817177b61eda26
MD5 c19804f0ea45705a0449b581131022ef
BLAKE2b-256 47de1b9ab55af4ea815ef2bbc1b1ba13256bad2e4da1b0ea80332a5e50919409

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page