Basic binary and base change operations for numbers, with NodeJS