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

Bits index convention #200

Merged
merged 1 commit into from
Mar 28, 2024
Merged

Bits index convention #200

merged 1 commit into from
Mar 28, 2024

Conversation

mmaloney-sf
Copy link
Collaborator

Responding to #197, this PR adds a sentence explaining that we use a big-endian representation for values, with the index of the LSB as 0 and the MSB as one less than the length.

@mwachs5
Copy link
Collaborator

mwachs5 commented Mar 27, 2024

this seems to include changes from another PR?

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the last commit.

This appears to be stacked on #198.

@mmaloney-sf mmaloney-sf force-pushed the mmaloney/bits-index-convention branch from 2ad2b41 to 857a0ac Compare March 27, 2024 19:03
@mmaloney-sf
Copy link
Collaborator Author

Oops.

Fixed and force-pushed.

@mmaloney-sf mmaloney-sf force-pushed the mmaloney/bits-index-convention branch from 857a0ac to 8ec4a0f Compare March 27, 2024 19:04
@dtzSiFive
Copy link
Member

s/as/is/?

@programmerjake
Copy link

programmerjake commented Mar 28, 2024

Responding to #197, this PR adds a sentence explaining that we use a big-endian representation

I would call the LSB being bit zero little-endian or LSB0, unrelated to byte endianness.

also, iirc you wanted to have this be a language-wide convention, not just on the bits function.

@mmaloney-sf mmaloney-sf force-pushed the mmaloney/bits-index-convention branch from 8ec4a0f to c6456e9 Compare March 28, 2024 15:56
@mmaloney-sf
Copy link
Collaborator Author

I would call the LSB being bit zero little-endian or LSB0, unrelated to byte endianness.

I meant it more generally as bit endianness. The language I used in the PR should hopefully suffice.

also, iirc you wanted to have this be a language-wide convention, not just on the bits function.

I considered this, but it looked fairly specific to bits. (Although let me know if I overlooked another primop that used this). I'll keep this in the back of my mind and hoist it up if needed.

@mmaloney-sf mmaloney-sf merged commit ff633ed into main Mar 28, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

5 participants