public function numToBinary($value)
    {
        $saved_object_count = $this->writtenObjectCount++;

        $val = "";
        if (intval($value) == $value && !is_float($value) && strpos($value, '.') === false) {
            $val = $this->intToBinary($value);
        } else {
            $val = $this->realToBinary($value);
        }

        $this->objectTable[$saved_object_count] = $val;
        return $saved_object_count;
    }