# Halstead Program Volume

### From Maisqual Wiki

## Contents |

# Definition

According to Halstead, Program Volume V corresponds to the minimum number of bits required for program coding.

*V* = *N* * *l**o**g*_{2}(*n*)

where

- V is the Halstead Program Volume,
- N is the Halstead Program Length, and
- n is the Halstead Vocabulary.

For each occurrence of N operator or operand which appears in the program, a number v of bits are required to specify it such that *n* = 2*v*, thus *v* = *l**o**g*_{2}(*n*). The above formula is deduced from this.

# See also

Glossary:

Metrics: