I'm trying to convert the integer 1101 in binary to 13 in decimal. I can do:
0b1101.to_s(10) # => 13
How would I take 1101 and add the "0b"
to the front? Is that possible?
I'm trying to convert the integer 1101 in binary to 13 in decimal. I can do:
0b1101.to_s(10) # => 13
How would I take 1101 and add the "0b"
to the front? Is that possible?