WebToolsForAll

Tools / Calculators

Integer and bitwise expressions

Evaluate the supported signed64-bit integer and bitwise syntax.

Input

0 UTF-16 code units

Inputs start empty. Load example fills them only when you choose it. Reset clears current inputs and results.

Output

Work through the task

Evaluate integer arithmetic and bitwise operators with signed 64-bit bounds.

  1. Enter only supported integer literals, parentheses and operators.
  2. Read the signed decimal result alongside its 64-bit hexadecimal and binary representations. Division truncates toward zero.
  3. Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.

Example to check

(-7 / 3) ^ (1 << 4) → -18; hexadecimal is the 64-bit two’s-complement pattern.

Limits and output behavior

Maximum 4,096 expression characters, 1,000 tokens and 40 nesting levels. Overflow, division by zero, shifts outside 0–63 and code-like syntax are rejected.

Troubleshooting

Check signed 64-bit range, literal syntax, parentheses and shifts 0–63. Division by zero/overflow and unsupported code-like syntax are rejected; integer division truncates toward zero.

Questions

Why does a negative result have a long hexadecimal form?

The hexadecimal/binary views display the 64-bit two’s-complement bit pattern. The signed decimal value can therefore be negative while the bit pattern has high set bits.

Input and privacy

Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.