Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[basic.fundamental] p5 Improve the definition of base-2 representation of the signed integer type #5545

Open
xmh0511 opened this issue Jul 1, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jul 1, 2022

[basic.fundamental] p5

Each value x of an unsigned integer type with width N has a unique representation x = x020 + x121 + ... + xN-12N-1, where each coefficient xi is either 0 or 1; this is called the base-2 representation of x. The base-2 representation of a value of signed integer type is the base-2 representation of the congruent value of the corresponding unsigned integer type.

Change the emphasized part to

For value x, the value of the corresponding signed integer type that is congruent to x modulo 2N has the same base-2 representation as that of x.

This is easier to read and looks stricter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant