half-byte-last

nazarijtipusak080/work-with-bit/half-byte-last

No description
half-byte-last
@/half-byte-last
INbyte
half-byte-last
OUT
IN
OUTbyte
To use the node in your project you should have the nazarijtipusak080/work-with-bit 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

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        uint8_t x = getValue<input_IN>(ctx);
      
        emitValue<output_OUT>(ctx, x >> 4);
    }
}