Table Of Contents

bitget

Version:
    Last Modified: January 9, 2017

    Returns the value of a bit at a particular position in a number. For example, if a = 10 (1010), bitget(a,4)= 1.

    Syntax

    c = bitget(a, b)
    c = bitget(a, b, d)

    Inputs

    a

    Scalar or array of any dimension. If you use c = bitget(a, b), a is of type uint64. If you use c = bitget(a, b, d), a is of type d.

    b

    Position of the bit whose value you want to know. b is a positive integer.

    d

    Assumed data type of a.

    Name Description
    'uint64'

    uint64

    'uint32'

    uint32

    'uint16'

    uint16

    'uint8'

    uint8

    'int64'

    int64

    'int32'

    int32

    'int16'

    int16

    'int8'

    int8

    Outputs

    c

    Value of the bit at position b in a. c can be either 0 or 1.

    A = 2345;
    C = bitget(A, 4)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics