import { Bit , Bits } from '../types' ; example param { Array } bits return { Integer } export default ( bits ) : Bit => { if ( bits . length < 2 ) throw new RangeError ( 'Not enough bits.' ) ; let result = bits [ 0 ] ; for ( let i = 1 ; i < bits . length ; i ++ ) result &= bits [ i ] ; return result ; } ;