bin2dec is a CLI tool to convert binary numbers to decimal numbers. I built this CLI app to solve and handle some problems in exceptional situations about developing Bash/Batch scripts when they need to know binary format.
Below there are three example of running code in action:
Run with command line argument:
$ ./bin2dec 10000000
128
Simply it converts '10000000' from binary to '128' as a decimal number.
You can use output as a decimal number in expressions.
Run without command line argument(Interactive mode):
$ ./bin2dec
bin2dec - Binary to Decimal Convertor Version 4.0
Copyright (c) 2015-2019 ardeshirv@protonmail.com, Licensed under GPLv3+
Enter a binary number(use only 0 and 1): 10000000
Binary(10000000) = Decimal(128)
$