This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

ASCII to Integer

From CANNY Wiki
Revision as of 08:58, 19 November 2015 by MEGA (Talk | contribs) (Created page with " <div style="float:right;margin:5px;"> {|class="cannytable" width="350px" |- !colspan="2" style="background-color:#AFEEEE;"|Appearance |- |colspan="2" align="center" style="...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Jump to: navigation, search
Appearance
Изображение:5_10_5_2.png
Symbol
ATOI
Group
Converters
Inputs
Symbols 1 & 0: пара ASCII символов
... ...
Symbols 15 & 14: пара ASCII символов
Основание: числовой
Outputs
Number: числовой
Version CANNY Lab
с 1.8

left|Иконка

Converts the number string representation for a given base 2, 10 or 16 in to a numeric value.

The original string must contain, valid in the selected numeral system, characters on the positions: 0..15, 11..15 or 12..15 for a given bases 2, 10 and 16, respectively.


Features

Symbols, which set outside of these position ranges, discarded.

In case of invalid characters presence on inputs, the value of the output will be set to 0.

In the case of using an invalid base value output value will be set to 0.

Examples

thumb|«0101101110100000» по основанию 2 = 23456 thumb|«0000000000123456» по основанию 10 = 23456 (символ "1" отброшен)
thumb|«00000000000F5Ba0» по основанию 16 = 23456 (символ "F" отброшен) thumb|«0000000000005BG0» по основанию 16 = 0 (недопустимый символ "G")

Notes

With the release of CANNY Lab version 1.8 a new data presentation added - "A pair of characters" in which the values are represented by two characters ASCII with the codes given by high and low bytes of displaying 16-bit value .

For example, the decimal number 19778 corresponding hexadecimal 0x4B4E, displayed a pair of characters «KN», having ASCII-code 0x4B, and 0x4E respectively.

See also

Converter 8-to-1

Converter 16-to-1

Converter 1-to-8

Converter 1-to-16

Integer to ASCII

Конвертер числа в строку символов

Встроенные функциональные блоки