half-byte-first

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

No description
half-byte-first
@/half-byte-first
INbyte
half-byte-first
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);
      x <<= 4;
        emitValue<output_OUT>(ctx, x >> 4);
    }
}