www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - how to print "111000" out into 0b111000

reply michaelbi <shunjie.bi gmail.com> writes:
as captioned... thx.
Jan 19 2022
parent reply Brian Callahan <bcallah openbsd.org> writes:
On Wednesday, 19 January 2022 at 15:01:29 UTC, michaelbi wrote:
 as captioned... thx.
```d import std.stdio; import std.conv; void main() { writefln("0b%b", to!int("111000", 2)); } ```
Jan 19 2022
parent MichaelBi <shunjie.bi gmail.com> writes:
On Wednesday, 19 January 2022 at 15:41:31 UTC, Brian Callahan 
wrote:
 On Wednesday, 19 January 2022 at 15:01:29 UTC, michaelbi wrote:
 as captioned... thx.
```d import std.stdio; import std.conv; void main() { writefln("0b%b", to!int("111000", 2)); } ```
Got it, thanks
Jan 19 2022