Hacker News new | ask | show | jobs
by signa11 3450 days ago
you could as well provide an explicit mask to help (how far does the sign extend) python f.e a

         'bin(-5 & 0b1111)' gives 
         '0b1011' 
which is what you want