Two's Complement Converter - Online Binary Negative Encoder
Convert decimal negative and positive numbers to 8/16/32-bit two's complement binary. Essential for low-level programming.
UD5 Toolkit
Convert between decimal integers and signed magnitude binary representation. Visualize the sign bit and magnitude bits.
Enter a decimal integer to get its signed magnitude binary representation.
Enter a signed magnitude binary string to get its decimal value.
| Bit Width | Min Value | Max Value | Distinct Values | Special Case |
|---|---|---|---|---|
| 4-bit | −7 | +7 | 15 | +0 (0000), −0 (1000) |
| 8-bit | −127 | +127 | 255 | +0 (00000000), −0 (10000000) |
| 16-bit | −32,767 | +32,767 | 65,535 | +0, −0 |
| 32-bit | −2,147,483,647 | +2,147,483,647 | 4,294,967,295 | +0, −0 |
00000101 = +5 and 10000101 = −5. This representation is intuitive for humans but has some drawbacks in hardware implementation, which is why modern computers typically use two's complement instead.
10000101 → sign bit is 1 (negative), magnitude bits 0000101 = 5, so the result is −5. Use our converter above to practice!
0000101 (7 bits), result = 10000101. Check the range first — our tool validates this automatically!
00000000 in 8-bit). −0 is represented with a sign bit of 1 and all magnitude bits as 0 (e.g., 10000000). This duplication occurs because the sign bit is independent of the magnitude — both represent zero mathematically, but have different binary encodings. This is one of the disadvantages of signed magnitude: it wastes one bit pattern and complicates arithmetic circuits. Two's complement avoids this by having only one zero.
| Feature | Signed Magnitude | Two's Complement |
|---|---|---|
| Sign bit | Independent (1 = negative) | Integrated (MSB has negative weight) |
| Zero representation | Two zeros (+0, −0) | One zero |
| 8-bit range | −127 to +127 | −128 to +127 |
| Hardware simplicity | More complex (separate sign handling) | Simpler (unified addition) |
| Usage | Floating-point (IEEE 754 mantissa sign) | Integer arithmetic in modern CPUs |
Convert decimal negative and positive numbers to 8/16/32-bit two's complement binary. Essential for low-level programming.
Convert any integer up to 3999 into its Roman numeral representation and vice versa. Quick and accurate. Local.
Convert numbers to Roman numerals and decode Roman numerals back to numbers. Supports up to large values. A fun educational tool running entirely in your browser.
Convert any date into Roman numerals (day‑month‑year) for tattoos or special occasions. Clean and local.
Convert any date into Roman numerals (day‑month‑year) for tattoos or special occasions. Clean and local.
Generate a horizontal Code‑128 barcode from any string. Download as PNG or SVG. Works offline. For inventory.
Adjust cocktail ingredient quantities based on desired total volume or number of servings. Preserve classic ratios. Perfect for home bartenders.
Convert a Gregorian calendar date to its Julian Day Number and vice versa. Used in astronomy and mainframe computing.
Define min and max font sizes and viewport widths. Generate a complete fluid type scale using CSS clamp() for all headings.
Write expressions with clamp(), min(), max(), abs(), sign(), round() and see the computed value. Modern CSS calculations.
Paste any JavaScript snippet and get a ready‑to‑drag bookmarklet link. Minify and encode automatically. Pure client.
Enter starting room temp, target temp, and method to see how many minutes to chill your wine perfectly.
Shows live countdown to major holidays and allows custom ones. Visual calendar. Local browser storage.
Calculate how many books, DVDs, or vinyl records fit on a shelf given its length and depth. Useful for home library planning. Local only.
Find out what day number of the year any date is (1‑366). Also shows days remaining. Simple reference.
Calculate tips and split bills easily. Adjust tip percentage and number of people. Perfect for dining out. All computations happen on your device.
Find equivalent colors across DMC, Anchor, and Madeira embroidery floss brands. Enter a code to see matches. Local reference database.
Paste long text and split it into 2, 3, or 4 balanced CSS columns. Preview and copy HTML/CSS. For magazine layouts.
Enter min and max font sizes and viewport widths to generate a perfect CSS clamp() expression. Fluid typography without media queries.
Wait for the box to turn green, then tap as fast as possible. Measure milliseconds. Compete with friends.
Paste a URL or HTML to detect known vulnerable JavaScript library versions. Quick security audit. Client‑side only.
Look at HTTP headers and JavaScript objects to guess which browser extensions might be installed. For awareness.
Paste two JSON objects and see a highlighted diff showing what was added, removed, or changed. For API testing.
Enter any date and instantly know which quarter it belongs to. Also shows fiscal quarter if start month set.
Fairly distribute pooled tips among staff based on hours worked or points. Customizable percentages. All calculations local and private.
Pomodoro timer that saves completed sessions to localStorage. View daily/weekly stats. Boost productivity with data.
Select multiple images, arrange their order, and merge them into a single PDF document. Works offline in your browser.
Apply a true negative color effect to your image. Simulate a film negative or invert scanned documents. Instant canvas transformation.
Paste an HTML `<table>` snippet and instantly get a clean Markdown table. Supports colspan and alignment hints. Local.
Enter a Kelvin value (1000‑40000) and see the approximate white‑balance color. Photography and lighting reference.