convert2base
Version:
Project developed to perform basic binary conversions involving binary, octal, decimal and hexadecimal numbers.
11 lines (7 loc) • 364 B
text/typescript
import { convertOctalToBinaryRecursive } from '../../utils/octal/octal-to-binary-util';
import { validateOctalNumber } from '../../validators/octal-number-validator';
export const octToBin = (octalNumber: string): string => {
validateOctalNumber(octalNumber);
const binaryNumber = convertOctalToBinaryRecursive(octalNumber);
return binaryNumber;
};