What is a radix in integer class in dart programming?

Viewed 1164

I am learning dart programming language for Flutter. In the integer class what does the word radix means ? Please explain me this. Thanks

2 Answers

Sometimes we have to work with string in radix number format. Dart int parse() method also supports convert string into a number with radix in the range 2..36:

For example, we convert a Hex string into int:

var n_16 = int.parse('FF', radix: 16);

The output of the code = 255

Using radix function we can also convert Binary numbers into decimal numbers like this

var decimal = int.parse('1001001', radix:2)'
Related