vector<int8_t> foo = {-125, 5};
int i = ((foo[0] + 256 * foo[1]) ^ 0x8000) - 0x8000;
cout << i << endl; // -> 1155
const foo = new Int8Array(2);
foo[0] = -125;
foo[1] = 5;
console.log(new Int32Array(foo.buffer)[0]); // -> 1411
foo[0] + 256 * (foo[1]) + foo[2] + 256 * (foo[3])