SciCalc.net
IndiaFree tools

Binary calculator

Type a binary number or a calculation in binary, such as 1011 + 110 or 1010 AND 1100. Results are shown in binary, decimal, hex and octal.

Last updated

Decimal17
Hex11
Octal21
Binary0000 0000 0001 0001

Working

    Try:

    How it works

    Binary is base 2: each place is worth twice the place to its right (1, 2, 4, 8, …). 1011₂ = 8 + 0 + 2 + 1 = 11.

    Negative numbers use two’s complement in the word size you choose: in 8 bits, −1 is 1111 1111. Division keeps the whole-number part, as on handheld calculators in BASE-N mode.

    Worked example

    Add 1011 + 110. 1011₂ = 11 and 110₂ = 6, so the sum is 17 = 10001₂ (hex 11). 1010 AND 1100 keeps the bits set in both: 1000₂ = 8.

    Binary, decimal and hex from 0 to 15

    DecimalBinaryHexDecimalBinaryHex
    000000810008
    100011910019
    200102101010A
    300113111011B
    401004121100C
    501015131101D
    601106141110E
    701117151111F

    How do you subtract and multiply in binary?

    Subtract column by column from the right, as in decimal. When the top digit is too small, borrow from the next column; a borrow is worth 2, not 10. For 11011 − 1110, the answer is 1101. Check it in decimal: 27 − 14 = 13.

    To multiply, note that each digit of the second number is 0 or 1. For 1101 × 101, write 1101 for the right-hand 1, skip the 0, and write 1101 shifted two places (110100) for the left-hand 1. Add them: 1101 + 110100 = 1000001. In decimal that is 13 + 52 = 65, and 13 × 5 = 65.

    The calculator accepts +, −, × (or *), ÷ (or /), brackets, AND, OR, XOR, XNOR, NOT and NEG. It has no shift operators.

    Same bits, two readings: signed and unsigned

    The bit pattern 1001 0110 is 150 if you read it as unsigned. As a signed 8-bit number its top bit is the sign bit, so it means 150 − 256 = −106. Type 10010110 with an 8-bit word size and the calculator shows −106. At 16-bit the same digits get leading zeros, so it shows 150.

    The Decimal line shows the signed value. The Hex, Octal and Binary lines show the raw bits. The word size sets the range:

    Word sizeSigned rangeUnsigned range
    8-bit−128 to 1270 to 255
    16-bit−32,768 to 32,7670 to 65,535
    32-bit−2,147,483,648 to 2,147,483,6470 to 4,294,967,295
    64-bit−263 to 263 − 10 to 264 − 1

    In 8-bit two's complement, 0111 1111 (127) + 1 gives the pattern 1000 0000, which reads as −128. This calculator does not wrap around. It reports that the result is outside the 8-bit range.

    Common mistakes

    • Typing a decimal value that does not fit the signed range. In 8-bit, decimal 255 is out of range; type 11111111 in binary instead, which reads as −1.
    • Mixing up OR and XOR. 1100 OR 1010 = 1110, but 1100 XOR 1010 = 0110, because XOR drops the bit set in both.
    • Expecting fractions. Binary fractions exist (0.1012 = 1/2 + 0/4 + 1/8 = 0.625), but this calculator takes whole numbers only. Decimal 0.1 has no exact binary form; its bits repeat forever.
    • Treating KB and KiB as the same. The IEC binary prefixes are kibi (Ki) = 210 = 1024, mebi (Mi) = 220 = 1,048,576 and gibi (Gi) = 230 = 1,073,741,824. One GiB is 73,741,824 bytes more than one GB (1,000,000,000 bytes).

    Tips

    • Choose the word size before working with negative numbers or NOT; the answer depends on it.
    • Group binary digits in fours to read hex: 1111 = F.
    • Only whole numbers are supported.

    Questions

    How do I convert binary to decimal?

    Add the place values of the 1s: 1101 = 8 + 4 + 1 = 13.

    Why is NOT 0 shown as −1?

    In two’s complement, all bits set (1111 1111) means −1.

    Can I use fractions?

    No. Binary mode works with whole numbers only.

    What is −100 in 8-bit binary?

    1001 1100. In two's complement, −100 is stored as 256 − 100 = 156, and 156 = 128 + 16 + 8 + 4.

    What is the largest 8-bit number?

    255 (1111 1111) if the byte is unsigned, or 127 (0111 1111) if it is signed.

    Can I shift bits left or right?

    There are no shift operators. Multiplying by 10 (binary 2) shifts a number one place to the left, as long as the result fits the word size.

    Sources

    1. NIST Physics Laboratory: Prefixes for binary multiples. Table of binary prefixes (kibi to exbi) and the examples comparing MiB with MB and GiB with GB; IEC 60027-2 Amendment 2. Checked 22 November 2026.
    2. Casio fx-115ES PLUS / fx-991ES PLUS C (2nd edition) user's guide, support.casio.com: Base-n Calculations (BASE-N). DEC, HEX, BIN and OCT; and, or, xor, xnor and Not; negative values use two's complement; fractional parts are cut off. Checked 22 November 2026.