encode 8

binary encoder (8 bit plus sign) i0
Author: Sputnki
License: BSD
Github: sptnk/logic/encode 8.axo

Inlets

bool32 bit 0 LSB

bool32 bit 1

bool32 bit 2

bool32 bit 3

bool32 bit 4

bool32 bit 5

bool32 bit 6

bool32 bit 7 MSB

bool32 sign bit

Outlets

int32 output

Declaration
int i_out;
Control Rate
i_out = inlet_b0 * 1 + inlet_b1 * 2 + inlet_b2 * 4 + inlet_b3 * 8 +
        inlet_b4 * 16 + inlet_b5 * 32 + inlet_b6 * 64 + inlet_b7 * 128;
if (inlet_sign == 1)
  i_out = -1 - i_out;
outlet_out = i_out;

Privacy

© 2024 Zrna Research