<< Go back to all functions

BASE

The BASE function in Google Sheets converts a number into a text representation in another base. It is commonly used to convert numbers into binary form by specifying a base of 2. Explore this comprehensive guide to learn how to use the BASE function effectively.

Function Syntax and Parameters

Syntax: BASE(value, base, [min_length])

Parameters:

  • value: The number to be converted into a different base.
  • base: The base to which the number should be converted. For example, use 2 for binary, 16 for hexadecimal, etc.
  • [min_length]: [Optional] The minimum number of digits that the result should contain. If the minimum length is not reached, zeros are added to the left.

Step-by-Step Tutorial

  1. Convert a number to a different base:

    • Example: =BASE(10, 2)
    • Result: 1010
  2. Apply a minimum length to the result:

    • Example: =BASE(10, 2, 8)
    • Result: 00001010

Use Cases and Scenarios

  1. Binary Conversion: Convert numbers to binary representation.
  2. Hexadecimal Conversion: Convert numbers to hexadecimal representation.
  3. Custom Base Conversion: Convert numbers to a custom base representation.

Related Functions

  • DEC2BIN: Convert a decimal number to binary.
  • HEX2DEC: Convert a hexadecimal number to decimal.
  • BIN2DEC: Convert a binary number to decimal.

Related Articles