Binary digits
say .fmt("%b") for 5, 50, 9000;
Output:
101
110010
10001100101000
Alternatively:
say .base(2) for 5, 50, 9000;
Output:
101
110010
10001100101000
Last updated
Was this helpful?
say .fmt("%b") for 5, 50, 9000;
101
110010
10001100101000
Alternatively:
say .base(2) for 5, 50, 9000;
101
110010
10001100101000
Last updated
Was this helpful?