;; Example algorithm to convert binary numbers to decimal ;; numbers. Also works for hexadecimal or any other ;; base system, just by changing the value of the ;; variable "base"! base = 2 sum = 0 pv = 1 ;; "number" should be a list of binary (or base "base") digits for each digit in number from last to first do { sum = sum + (digit * pv) pv = pv * base } return (sum)