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

to_le_bits and to_be_bits give the same output #1400

Closed
onurinanc opened this issue May 25, 2023 · 0 comments · Fixed by #1765
Closed

to_le_bits and to_be_bits give the same output #1400

onurinanc opened this issue May 25, 2023 · 0 comments · Fixed by #1765
Labels
bug Something isn't working

Comments

@onurinanc
Copy link

Aim

`let x = 3;
let bits_x = x.to_le_bits(4);

    for i in 0..4 {
        let mut bit = bits_x[i];
        std::println(bit);
    }`

Expected Behavior

I've tried to_le_bits and to_be_bits as a Field method to write a if comparision statement for the Fields, however, to_be_bits doesn't work properly

Bug

for to_le_bits(), the result is
0x01
0x01
0x
0x

for to_be_bits(), the result is
0x01
0x01
0x
0x

To Reproduce

Installation Method

None

Nargo Version

nargo 0.5.1 (git version hash: 7f6dede, is dirty: false)

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@onurinanc onurinanc added the bug Something isn't working label May 25, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 25, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant