Skip to content

Bit Manipulation: Get the bit at the given position #4437

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

Closed
cereblanco opened this issue May 18, 2021 · 0 comments · Fixed by #4438
Closed

Bit Manipulation: Get the bit at the given position #4437

cereblanco opened this issue May 18, 2021 · 0 comments · Fixed by #4438

Comments

@cereblanco
Copy link
Contributor

Bit Manipulation: Get the bit at the given position

Examples:

    >>> get_bit(0b1010, 0) # bit at 0 position is 0
    0
    >>> get_bit(0b1010, 1) # bit at 1 position is 1
    1
    >>> get_bit(0b1010, 2) # bit at 2 position is 0
    0
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 a pull request may close this issue.

1 participant