-1
$\begingroup$

I don't actually have any code for this, as I have no real idea how to do it. I have a large binary number combination that I know turns into some sort of string. How would I go about translating it?

$\endgroup$
  • 2
    $\begingroup$ How do you know it becomes a string? Is it a code? $\endgroup$ – Marius Ladegård Meyer Jun 3 '16 at 16:14
  • $\begingroup$ You really have to explain this better. What is a "binary number"? Can you show an example? How does it map to a string? $\endgroup$ – Szabolcs Jun 3 '16 at 16:17
  • $\begingroup$ Where did the "large binary number combination that ... turns into some sort of string" come from? $\endgroup$ – J. M.'s discontentment Jun 3 '16 at 16:18
  • $\begingroup$ This question is too broad. The conversion from binary to string can be anything from @BobHanlon 's answer to converting binary to Unicode characters. $\endgroup$ – JungHwan Min Jun 3 '16 at 17:04
10
$\begingroup$
bin = 1011011;

words = (bin // IntegerDigits) /. {1 -> "one", 0 -> "zero"};

(str = StringJoin[Riffle[words, " "]]) // InputForm

(*  "one zero one one zero one one"  *)

Speak[str]
| improve this answer | |
$\endgroup$
  • 5
    $\begingroup$ I love this so much $\endgroup$ – Marius Ladegård Meyer Jun 3 '16 at 16:24
  • 2
    $\begingroup$ Haha... that's the funniest answer I ever seen :) $\endgroup$ – BlacKow Jun 3 '16 at 16:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.