The DECIMAL function in Google Sheets converts the text representation of a number in a specified base (such as binary, octal, or hexadecimal) into its base-10 (decimal) equivalent. It's a handy tool for anyone working with number systems outside of everyday base 10. Dive into our comprehensive guide to master its application.
Parameters
value: The text representation of the number to convert, expressed in the given base.base: The base of the number system used to expressvalue, such as2for binary or16for hexadecimal.
Step-by-Step Tutorial
-
Converting a binary number to decimal:
- Example:
=DECIMAL("1010", 2) - Result:
10
- Example:
-
Converting a hexadecimal number to decimal:
- Example:
=DECIMAL("FF", 16) - Result:
255
- Example:
Use Cases and Scenarios
- Number System Conversion: Convert values from binary, octal, or hexadecimal into standard decimal form.
- Computer Science Education: Demonstrate how different number bases relate to one another.
- Data Import Cleanup: Normalize numeric values that were exported in non-decimal formats.
Related Functions
BASE: Converts a decimal number into text representation in another base.DEC2BIN: Converts a decimal number to binary.DEC2HEX: Converts a decimal number to hexadecimal.