this is fairly easy. The prinf() function allows you to format the output.
With the format-string "%-b" you select the output to be binary.
For example:
> val1 = 3;
> val2 = 2.5;
> printf("%-b", val1);
> 0b11
> printf("%-b", val2);
> 0b101/0b10 (<<< 5/2)
Look up "help printf" for alternatives...
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi nobody (like me :-),
this is fairly easy. The prinf() function allows you to format the output.
With the format-string "%-b" you select the output to be binary.
For example:
> val1 = 3;
> val2 = 2.5;
> printf("%-b", val1);
> 0b11
> printf("%-b", val2);
> 0b101/0b10 (<<< 5/2)
Look up "help printf" for alternatives...
Regards