Skip to content

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

Closed
@cereblanco

Description

@cereblanco

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions