Why −1 shows up as FFFF

Enter minus one as decimal and the base converter's 16-bit row answers with four F's — the machine-word result every embedded interview asks about.

Number bases and coding · Level: Exam and contest · Updated on 2026-11-09

A fixed-width word has no room for a sign, so a negative number is defined by what it takes to get back to zero. In 16 bits, 65535 + 1 overflows to 0, so 65535 simply is −1. Write 65535 in base 16 and the digits are FF FF — which is why −1, 0xFFFF and "all bits set" are three ways of naming one and the same word.

The converter prints both readings side by side: the HEX, DEC and BIN rows carry the sign and return −1, while the 16-bit row returns FFFF. That pair is the whole lesson. It is also why a loop counter that steps below zero compares as 65535 against an unsigned bound, why sign extension copies the top bit rather than zero, and why the same byte read as signed is −1 but read as unsigned is 255.

Answer

FFFF

How to read it

The 16-bit row. The HEX row on the same screen prints −1; unsigned, the same word is 65535.

Source

Two's complement integer representation; C made it the only permitted form for signed integers in C23 (ISO/IEC 9899:2024), 6.5.7

Work it in the calculator

These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.

This is an independent third-party tool site. It is not affiliated with, sponsored by, or authorised by Casio, Texas Instruments or their distributors. Model names and product names are trademarks of their respective owners and appear here only to identify devices.

The keystroke sequences in these manuals were written from this site's own layout data — the same data the online calculator renders — plus publicly available product facts. Specifications and regional configurations are confirmed against the physical device and the manufacturer's most recent material.