A REPL CLI calculator for storage expression evaluation, SI/IEC conversion, byte address calculation, and general-purpose arithmetic.
bcal is a command-line calculator specifically designed for storage-related calculations, including evaluating expressions with units like GiB and MiB, converting between SI and IEC binary prefixes, calculating byte addresses, and performing LBA/CHS conversions. It solves the problem of manual computation for developers and engineers working with storage, memory, and low-level data structures.
System engineers, firmware developers, and low-level programmers who need to perform precise calculations involving storage capacities, addresses, and binary/hexadecimal conversions in their workflow.
Developers choose bcal for its focused feature set on storage calculations, minimal dependencies, and REPL interface that simplifies complex conversions and expressions without needing external tools or manual math.
:1234: Bits, bytes and general-purpose calculator
bcal can be built without external dependencies using O_NORL=1, making it lightweight and easy to deploy in constrained environments, as described in the installation section with options like static builds.
It accurately handles SI and IEC binary prefixes, unit conversions, and LBA/CHS calculations, essential for system engineers, with features like custom sector size configuration and address formatting.
The tool offers both REPL and single-execution modes, enabling interactive calculations and scripting with piped input or file redirection, as shown in the examples with commands like 'bcal -b'.
Supports a wide range of storage units from bytes to terabytes in both SI and IEC standards, allowing seamless conversions, with case-insensitive units and hex/decimal inputs as per the operational notes.
bcal explicitly only supports 64-bit operating systems, excluding it from use on older or embedded 32-bit platforms, which limits its compatibility for legacy hardware projects.
The tool does not support fractional bytes and shows floor values for non-integer calculations, as stated in the README, which can lead to inaccuracies in precise storage allocations.
Building from source requires handling make options like O_NORL or O_EL and dependencies such as readline, which might be challenging for less technical users, as detailed in the installation steps.
While it includes general-purpose operations, bcal is primarily focused on storage calculations, so it may not suffice for complex scientific or financial computations beyond its built-in functions.
:cherry_blossom: A command-line fuzzy finder
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Collaborative cheatsheets for console commands 📚.
A smarter cd command. Supports all major shells.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.