anchor.diff:               b)))))
         
   (defun num-gen (n)
  +  "return a function representing prbs-N. The function takes a single argument which is the number of the next n-bit integer values to generate from the sequence (default 1 value)."
     (let ((v (make-prbs n)))
       (labels ((rec (&optional (c 1))
                     (when (> c 0)
  
positive.code:                  (bitbv (newbit bv)))))
  
  (defun make-prbs (n &optional (iv 2))
    (let ((taps '(0 1))
          (init (num->bits iv n)))
      (labels ((rec (v)
  
negative.code:                         (setq v (dcdr v))
                          (cons (bv2int b) (rec (1- c))))))))
        #'rec)))
  
  (defun byte-gen (n)
    "return a function representing prbs-N. The function takes a single argument which is the number of the next unsigned integer values to generate from the sequence (default 1 value).
  The final byte will be zero-padded if necessary."
    (let ((gen (bit-gen n)))
      (lambda (&optional (c 1))
        (loop repeat c
             collect (bv2int (funcall gen 8))))))
                                
  (defun bv2int (b &optional (m 1) (a 0))
    (when b
  