// test.c
#include <stdio.h>
void main(void){
   unsigned short x = 0xffff;
   printf("%04x", ~x+1u);
}