Skip to content

Instantly share code, notes, and snippets.

View Papouchcom's full-sized avatar

papouch.com Papouchcom

  • Papouch s.r.o.
  • Strašnická 3164, Prague, Czech Republic
View GitHub Profile
@mathewmariani
mathewmariani / binary.js
Created May 18, 2016 23:22
A quick look at signed and unsigned integers in JavaScript.
var UInt4 = function (value) {
return (value & 0xF);
};
var Int4 = function (value) {
var ref = UInt4(value);
return (ref > 0x7) ? ref - 0x10 : ref;
};
var UInt8 = function (value) {