n-bit-of-byte

nazarijtipusak080/shift-4-bytes/n-bit-of-byte

No description
n-bit-of-byte
@/n-bit-of-byte
INbyte
nnumber
n-bit-of-byte
IN
nbit
n
nbitboolean
To use the node in your project you should have the nazarijtipusak080/shift-4-bytes library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

node {
    void evaluate(Context ctx) {
        uint8_t val = getValue<input_IN>(ctx);
        uint8_t in0 = getValue<input_n>(ctx);
         uint8_t in1 = (ctx, pow( 2, in0));
         emitValue<output_nbit>(ctx, in1 & val);

    }
}