Signed Magnitude Converter - Online Negative Binary Numbers
Encode decimal integers into signed magnitude binary representation and decode back. Learn computer arithmetic.
UD5 Toolkit
| Decimal | Binary (Two's Comp.) | Hex | Notes |
|---|---|---|---|
| −128 | 1000 0000 | 0x80 | Minimum value (special case) |
| −127 | 1000 0001 | 0x81 | |
| −42 | 1101 0110 | 0xD6 | |
| −1 | 1111 1111 | 0xFF | All bits set |
| 0 | 0000 0000 | 0x00 | Unique zero representation |
| +1 | 0000 0001 | 0x01 | |
| +42 | 0010 1010 | 0x2A | |
| +127 | 0111 1111 | 0x7F | Maximum value |
10000000, and the maximum value +127 is represented as 01111111. Zero is 00000000. The total number of distinct values is 256 (28), with 128 negative values, zero, and 127 positive values. Notice there is one more negative value than positive — this asymmetry is inherent to two's complement and is due to the fact that −128 has no positive counterpart in 8 bits.
00000000 and −0 = 11111111), which complicates arithmetic. Two's complement is one's complement plus one. This extra step eliminates the duplicate zero, extends the negative range by one value (e.g., −128 in 8-bit), and simplifies carry/borrow logic in ALU circuits. Two's complement is the standard in virtually all modern processors including x86, ARM, and RISC-V.
10000000. This is a special case because the absolute value |−128| = 128 cannot be represented as an unsigned 8-bit number (which maxes out at 255, but 128 in 8-bit binary is 10000000). Following the standard conversion: 128 in binary is 10000000, invert to get 01111111, add 1 to get 10000000 — which matches! The MSB being 1 correctly indicates a negative number, and the value works perfectly in arithmetic operations.
11010110 (8-bit) = −128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = −42.
01111111 (127) + 00000001 (1) in 8-bit yields 10000000 (−128), which is incorrect — this is overflow. Most CPUs set an overflow flag (V flag in ARM, OF in x86) when this happens, allowing software to detect and handle the condition.
int8_t in C), and small embedded systems. Range: −128 to 127.short integers in C. Range: −32,768 to 32,767.int type on most 32-bit and 64-bit platforms. Range: approximately ±2.1 billion.long integers, high-precision timestamps, and large file offsets. Range: approximately ±9.2 × 1018.
Encode decimal integers into signed magnitude binary representation and decode back. Learn computer arithmetic.
Generate a horizontal Code‑128 barcode from any string. Download as PNG or SVG. Works offline. For inventory.
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.
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.
Enter starting room temp, target temp, and method to see how many minutes to chill your wine perfectly.
Paste long text and split it into 2, 3, or 4 balanced CSS columns. Preview and copy HTML/CSS. For magazine layouts.
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 equivalent colors across DMC, Anchor, and Madeira embroidery floss brands. Enter a code to see matches. Local reference database.
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.
Fairly distribute pooled tips among staff based on hours worked or points. Customizable percentages. All calculations local and private.
Enter min and max font sizes and viewport widths to generate a perfect CSS clamp() expression. Fluid typography without media queries.
Shows live countdown to major holidays and allows custom ones. Visual calendar. Local browser storage.
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.
Paste any JavaScript snippet and get a ready‑to‑drag bookmarklet link. Minify and encode automatically. Pure client.
Enter any date and instantly know which quarter it belongs to. Also shows fiscal quarter if start month set.
Wait for the box to turn green, then tap as fast as possible. Measure milliseconds. Compete with friends.
Pomodoro timer that saves completed sessions to localStorage. View daily/weekly stats. Boost productivity with data.
Paste two JSON objects and see a highlighted diff showing what was added, removed, or changed. For API testing.
Look at HTTP headers and JavaScript objects to guess which browser extensions might be installed. For awareness.
Paste a URL or HTML to detect known vulnerable JavaScript library versions. Quick security audit. Client‑side only.
Select multiple images, arrange their order, and merge them into a single PDF document. Works offline in your browser.
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.
Convert a numeric amount into English words, perfect for writing checks or legal documents. Supports USD/GBP styles.