Calculations are loading. JavaScript is required. If this message stays visible, reload the page. You can still use the tool links below to browse the help.
Your inputs and results stay in this browser. Successful calculations send only a content-free completion signal for aggregate tool counts. No entered values, expressions or results are included.
What would you like to do?
New to digital logic? Start with Binary, Hex and ASCII Basics or the step-by-step Logic Tools guide.
Truth Tables
Generate a truth table from one Boolean expression. Your expression and results stay in this browser.
To build an equation from outputs, generate a starting table with your desired inputs (for example, A+B+C+D), then choose Edit output table. Editing and exact simplification support up to four inputs.
Use single-letter inputs A–Z (case-insensitive), constants 0 and 1, and an optional output label such as Y =. The output label cannot also be an input.
Truth table
Interpreted expression:
Rows run from all-zero to all-one. Select Explain on a row to see its calculation. Wide tables scroll inside the region below.
Row explanation
Table to equation
Edit outputs for up to four inputs (16 rows). Every row must be 0 or 1; don’t-cares are not supported.
This edited table is separate from the expression-generated table above. The explanations and intermediate values above describe only the original expression.
Exact minimum within two-level sum-of-products: first minimize the number of product terms, then the total number of literals (each variable occurrence). Equal-cost solutions use the ASCII-lexicographically first expression with sorted terms. Other equally minimal answers may exist. This is not a claim of the shortest expression across all Boolean notations.
Verified equations for edited outputs
Canonical sum of products — one complete minterm for each output-1 row:
Exactly minimized sum of products:
Karnaugh maps require two to four inputs. Equations above remain valid for constants and single-input tables.
Karnaugh map
This map shows the edited outputs. Axes use Gray code: 00, 01, 11, 10 for two-bit axes, so adjacent cells differ in one input. Opposite edges are adjacent; diagonal cells are not.
Each group is a rectangle of 1, 2, 4, 8 or 16 output-1 cells, possibly across an edge. Groups may overlap. Fixed inputs form the product term; inputs that vary disappear. These groups reproduce the verified minimum SOP above and cover every 1 without covering a 0.
Notation
- NOT
- A′, A', !A or ~A
- AND
- AB, A*B or A&B; adjacent groups also mean AND.
- XOR
- A^B
- OR
- A+B or A|B
Order: NOT, AND, XOR, OR. Parentheses override this order. Repeated NOT is allowed; typographic apostrophes will be normalized.
Example: Y = A' + B means “NOT A OR B”. For inputs 00, 01, 10, 11, Y is 1, 1, 0, 1.
Limits: 8 inputs (256 rows), 2,000 characters, and 32 nested parentheses/NOT levels. Constant expressions have one row. Intermediate results show up to 12 columns at a time; use the column controls to see more.
Quick number converter
Enter a decimal number to see its binary, hexadecimal and standard ASCII character code. Example: 93 becomes 01011101, 5D and ].
Number representations
- Decimal
- Binary
- Hexadecimal
- ASCII
Standard ASCII chart (0–127)
ASCII is a 7-bit character code. Binary below includes a leading 0 to show one byte. Codes 0–31 and 127 are controls; 32 is a space. Values above 127 have no standard ASCII character.
| Decimal | Binary | Hex | Character |
|---|
Binary Calculator
Calculate with fixed-width integers. Inputs and results stay in this browser.
8-bit unsigned range: 0 through 255.
Decimal represents an integer. Binary and hex represent bit patterns, with optional matching 0b/0x prefixes and spaces between digit groups. Maximum 256 characters per operand. Shift counts are always decimal.
Changing base preserves bits. Changing signed mode reinterprets the same bits. Changing width preserves the integer, with sign extension when needed; a narrower width is rejected if the value will not fit. Every edit clears the previous result.
Stored result
- Binary
- Decimal
- Hexadecimal
Binary notation and overflow
Arithmetic + means addition. Boolean + in Truth Tables means OR.
Example: 255 + 1 has exact result 256. With 8-bit unsigned storage it wraps to binary 00000000, decimal 0, hexadecimal 00, with overflow.
Widths: 4, 8, 16 and 32 bits. Signed mode uses two’s complement. Decimal inputs must fit the selected range; binary and hex inputs represent bit patterns. Division truncates toward zero; remainder follows the dividend’s sign. Division or remainder by zero is an error. Left shift reports the discarded high bits; signed right shift repeats the sign bit.