# Binary logic calculator

This means that operand 1 has one digit in its integer part and four digits in its fractional part, operand 2 has three digits in its integer part and six digits in its fractional part, and the result has four digits in its integer part and ten digits in its fractional part. Addition, subtraction, and multiplication always produce a finite result, but division may in fact, in most cases produce an infinite repeating fractional value. Infinite results are truncated — not rounded — to the specified number of bits.

For divisions that represent dyadic fractions , the result will be finite , and displayed in full precision — regardless of the setting for the number of fractional bits. Although this calculator implements pure binary arithmetic, you can use it to explore floating-point arithmetic. For example, say you wanted to know why, using IEEE double-precision binary floating-point arithmetic, There are two sources of imprecision in such a calculation: Decimal to floating-point conversion introduces inexactness because a decimal operand may not have an exact floating-point equivalent; limited-precision binary arithmetic introduces inexactness because a binary calculation may produce more bits than can be stored.

In these cases, rounding occurs. My decimal to binary converter will tell you that, in pure binary, To work through this example, you had to act like a computer, as tedious as that was.

First, you had to convert the operands to binary, rounding them if necessary; then, you had to multiply them, and round the result.

For practical reasons, the size of the inputs — and the number of fractional bits in an infinite division result — is limited. Convert a Boolean expression to disjunctive normal form:.

Convert a Boolean expression to conjunctive normal form:. Convert a Boolean expression to algebraic normal form:. Compute with Boolean functions specified by an integer index and the number of variables. Specify a minterm or maxterm by number:. Enable Javascript to interact with content and submit forms on Wolfram Alpha websites.

Analyze a Boolean expression: P and not Q. Compute a truth table for a Boolean function: Visualize the logic circuit of an arbitrary Boolean expression.