Yeah... it's confusing. Let me explain it a little better:
- With a string, get the unicode code points of each letter
- Let's use
"Hello World!"
. - The code points would be
[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]
- Let's use
- Of each digit of the code points, get their binary format
- Get the binary of
7
, then2
, then1
, then0
, and so on... ['111', '10', '1', '0', '1', '1', '0', '1000', ...]
- Get the binary of
- The binary integers are treated as decimal and summed, and that's the result.
- Take the integer of the binary (e.g.
'111'
is the integer111
in decimal; one hundred and one) then sum all of these integers. - The result of
"Hello World!"
would be4389
.
- Take the integer of the binary (e.g.
Test Cases
"Hello World!" -> 4389
"Foo Bar!" -> 1594
"Code Golf" -> 1375
"Stack Exchange" -> 8723
"Winter Bash" -> 2988
Shortest code in bytes wins!