---
title: "log2 · RUAL Documentation"
description: "Returns the base 2 logarithm of a number"
canonical: https://docs.rual.nl/block-types/math/number_math_log2
language: en
---

# log2

This block is part of the [`math`](https://docs.rual.nl/block-types/math) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

Returns the base 2 logarithm of a number

- number_0 required `number`

- Number `number`

A typical wiring for [Log2](https://docs.rual.nl/block-types/math/number_math_log2): the `number` out pin feeds [cast to value](https://docs.rual.nl/block-types/type%20casting/number_convert_to_value).

![Studio canvas example for the Log2 block: typical wiring for Log2.](https://docs.rual.nl/canvas-examples/number_math_log2.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
