Convert binary and decimal values or add two binary numbers.
Binary Calculator
Formula
bin2dec parseInt base2; dec2bin toString(2); bin_add sum then toString(2)
Uses base 2 parse and stringify. Addition happens in integer space.
This binary calculator converts binary to decimal, decimal to binary, or adds two binary values. Default binary 1010 equals decimal 10.
Modes cover Binary to Decimal, Decimal to Binary, and Add two binaries. Subtraction, bitwise operators, and automatic step diagrams are not included.
Methods
Binary to decimal reads the string as base 2. Decimal to binary writes a non negative integer in base 2. Addition converts both binaries to integers, adds them, then writes the sum in binary.
Worked examples
Binary to decimal: 1010 = 8 + 2 = 10. Decimal to binary: 13 = 1101. Add: 1011 + 1101 = 11 + 13 = 24 = 11000 in binary.