Skip to content

Instantly share code, notes, and snippets.

@timsneath
Created September 29, 2021 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timsneath/72a720631456c133c5c875c27882fedb to your computer and use it in GitHub Desktop.
Save timsneath/72a720631456c133c5c875c27882fedb to your computer and use it in GitHub Desktop.
void main() {
const address = -69795452;
const UINT32_MAX = 0xFFFFFFFF;
// Two's complement
print((UINT32_MAX - address.abs() + 1).toRadixString(16));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment