Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 777 Bytes

cast-to-base.md

File metadata and controls

44 lines (26 loc) · 777 Bytes

cast to-base

NAME

cast-to-base - Convert a number of one base to another.

SYNOPSIS

cast to-base [options] value base

DESCRIPTION

Convert a number of one base to another.

OPTIONS

Base Options

--base-in base     The base of the input number. Available options:

    10, d, dec, decimal

    16, h, hex, hexadecimal

{{#include common-options.md}}

EXAMPLES

  1. Convert the decimal number 64 to hexadecimal

    cast to-base 64 hex
  2. Convert the hexadecimal number 100 to binary

    cast to-base 0x100 2

Note: The --base-in parameter is not enforced but will be needed if the input is ambiguous.

SEE ALSO

cast