Skip to content

Instantly share code, notes, and snippets.

View bbaranoff's full-sized avatar

bastien baranoff bbaranoff

View GitHub Profile
@bbaranoff
bbaranoff / dst80.py
Created July 17, 2020 01:28 — forked from rqu1/dst80.py
dst80 python implementation
def bit(x,n): return (x>>n)&1
def bit_slice(x,msb,lsb): return (x&((2<<msb)-1))>>lsb
def bv2i(*args):
o=0
for i in args: o=(o<<1)|i
return o
def fa(x): return bit(0x3a35acc5,x)