Original Code / One's Complement / Two's Complement Calculator

Enter an integer to find its Original Code/One's Complement/Two's Complement

Enter Integer Bit Selection
Original Code
One's Complement
Two's Complement

Original Code / One's Complement / Two's Complement Calculator

The Original Code / One's Complement / Two's Complement Calculator is a professional tool for converting data representation methods, capable of quickly and accurately converting integers into their original code, one's complement, and two's complement representations in computers. It supports multiple bit widths from 4 to 128 bits and provides a custom bit length feature (1-256 bits). It is especially suitable for use in computer science learning, digital circuit design, and programming development, helping users understand the storage principles of integers in computers and binary representation methods.

How to Use the Original Code / One's Complement / Two's Complement Calculator

Basic Operation Steps

  1. Enter the integer to be converted (supports positive and negative numbers) in the input box.
  2. Select the bit width from the dropdown menu (4/8/16/32/64/128 bits or custom).
  3. When selecting "Custom", an additional input box appears to set the exact bit count (1-256).
  4. Click the "Convert" button or press the Enter key directly.
  5. View the results in the three binary representation formats.

Notes

Pay attention to the difference in sign bit representation when converting negative numbers.
When the custom bit width exceeds 128 bits, results are for theoretical reference only.
Two's complement is the actual storage format used in computers.
Converting large bit widths may require longer computation time.