[Question]
  [
Take a string, `s` containing printable ASCII-characters as input, and output its "binary split sum". Need an explanation?
**How do you get the binary split sum?**
We'll use the string `A4` as an example in the following explanation.
* Convert the characters to binary, treating each letters as a 7-bit ASCII character
```
A -> ASCII 65 -> 1000001
4 -> ASCII 52 -> 0110100
```
* Concatenate the binary numbers into a new binary number
```
A4 -> 1000001 & 0110100 -> 10000010110100
```
* Split the new binary number into chunks, where no `1` can have a `0` to its left. You should not split consecutive `1`s.
```
10000010110100 -> 100000, 10, 110, 100
```
* Convert these binary numbers to decimal
```
100000, 10, 110, 100 -> 32, 2, 6, 4
```
* Take the sum of these numbers:
```
32 + 2 + 6 + 4 = 44
```
So, the output for the string `A4` should be `44`.
---
**Test cases:**
```
a
49
A4
44
codegolf
570
Hello, World!
795
```
  
[Answer]
# [Python 2](https://docs.python.org/2/), ~~86~~ ~~81~~ 76 bytes
-5 bytes thanks Adnan  
-5 bytes thanks xnor  
```
s=0
for c in input():s=s*128+ord(c)
print eval(bin(s).replace('01','0+0b1'))
```
[Try it online!](https://tio.run/nexus/python2#DcJBCoAgEADAu6/wtrsZodEhAg89Rc1AEBW1vm8NM5qW7M6VOx7Svzwd6Wi6TWrdRa4XOmKlhtS5f01EGxI2Wqov0TiPIBXMIIW0CojGgHODDw "Python 2 – TIO Nexus")
`for c in input():s=s*128+ord(c)` to do the ASCII conversion numerically, where `*128` is used to left shift `s` 7 times (steps 1 and 2)  
`eval(('0'+new_bin).replace('01','0+0b1'))` to split and sum (steps 3, 4 and 5) 
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 13 bytes
```
Oḅ128BŒg;2/ḄS
```
[Try it online!](https://tio.run/nexus/jelly#@@//cEeroZGF09FJ6dZG@g93tAT/P9z@qGmN9///6onqOgrqjiYgMjk/JTU9PycNxPZIzcnJ11EIzy/KSVFUBwA "Jelly – TIO Nexus")
### How it works
```
Oḅ128BŒg;2/ḄS  Main link. Argument: s (string)
O              Ordinal; map characters to their code points.
 ḅ128          Unbase 128; convert the resulting list from base 128 to integer.
     B         Binary; Convert the resulting integer to base 2.
      Œg       Group consecutive, equal bits.
        ;2/    Concatenate all non-overlapping pairs.
           Ḅ   Unbinary; convert from base 2 to integer.
            S  Take the sum.
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 14 bytes
```
YB!'1+0*'XXZBs
```
[Try it online!](https://tio.run/nexus/matl#@x/ppKhuqG2gpR4REeVU/P@/enJ@Smp6fk6aOgA "MATL – TIO Nexus")
### Explanation
Consider input `'A4'` as an example.
```
YB        % Implicit input. Convert to binary using characters '0' and '1'. 
          % Gives a char matrix, where each row corresponds to a number
          % STACK: ['1000001'; '0110100']
!         % Transpose. This is necessary because MATL uses column-major 
          % order when linearizing a matrix into a vector
          % STACK: ['10'; '01'; '01'; '00'; '01'; '00'; '10']
'1+0*'    % Push this string: regexp pattern
          % STACK: ['10'; '01'; '01'; '00'; '01'; '00'; '10'], '1+0*'
XX        % Regexp. Linearizes the first input into a row (in column-major
          % order), and pushes a cell array of substrings that match the
          % pattern given by the second input
          % STACK: {'100000'; '10'; 110'; '100'}
ZB        % Convert each string into a decimal number. Gives numeric vector
          % STACK: [32; 2; 6; 4]
s         % Sum. Implicitly display
          % STACK: 44
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 18 bytes
Code:
```
Çžy+b€¦JTR021:2¡CO
```
Explanation:
```
Ç                   # Take the ASCII value of each character
 žy+                # Add 128 to each value (to pad each with enough zeros)
    b               # Convert to binary
     €¦             # Remove the first character
       J            # Join the array
        TR021:      # Replace 01 by 021
              2¡    # Split on the number 2
                C   # Convert from binary to decimal
                 O  # Sum them all up
```
Uses the **05AB1E** encoding. [Try it online!](https://tio.run/nexus/05ab1e#@3@4/ei@Su2kR01rDi3zCgkyMDK0Mjq00Nn//3@P1JycfB2F8PyinBRFAA "05AB1E – TIO Nexus")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 14 bytes
```
Çžy+b€¦Jγ2ôJCO
```
A port of [my Jelly answer](https://codegolf.stackexchange.com/a/120601/53748), using the 128 offset from [Adnan's 05ab1e answer](https://codegolf.stackexchange.com/a/120594/53748) (rather than the 256 in the Jelly answer I wrote).
**[Try it online!](https://tio.run/nexus/05ab1e#@3@4/ei@Su2kR01rDi3zOrfZ6PAWL2f///@T81NS0/Nz0gA "05AB1E – TIO Nexus")**
### How?
```
Çžy+b€¦Jγ2ôJCO
Ç              - to ordinals
   +           - add
 žy            - literal 128
    b          - to binary
     €         - for each
      ¦        -   dequeue
       J       - join
        γ      - group into chunks of equal elements
          ô    - split into chunks of
         2     - literal 2
           J   - join
            C  - from binary
             O - sum
```
[Answer]
## JavaScript (ES6), ~~97~~ 92 bytes
```
s=>eval(s.replace(/./g,c=>(128+c.charCodeAt()).toString(2).slice(1)).replace(/1+/g,'+0b$&'))
```
Edit: Saved 5 bytes with some help from @ConorO'Brien.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~18~~ 12 bytes
```
c_¤ùT7Ãò< xÍ
c_           // Firstly, take the input and map over it as charcodes.
  ¤          // Take the binary representation of each item
   ùT7       // and left-pad it with zeroes to standardize the items.
      Ã      // After all of the above,
       ò<    // partition the result where ever a 0 precedes a 1.
          xÍ // Then sum the numbers from base 2.
```
Takes input as a single string.  
I also tried out the 128 or 256 addition used by other answers, but 0-padding was shorter to use. 
Shaved off a whole whopping 6 bytes thanks to [ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions) and [Oliver](https://codegolf.stackexchange.com/users/61613/oliver).
[Try it out here.](https://ethproductions.github.io/japt/?v=1.4.5&code=Y1+k+VQ3w/I8IHjN&input=IkE0Ig==)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~16~~ 15 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
-1 byte thanks to Dennis (no need to flatten by 1 when a full flatten is fine - replace `;/` with `F`)
```
O+⁹Bṫ€3FŒg;2/ḄS
```
**[Try it online!](https://tio.run/nexus/jelly#ASYA2f//TyvigblC4bmr4oKsM0bFkmc7Mi/huIRT////ImNvZGVnb2xmIg)**
### How?
```
O+⁹Bṫ€3FŒg;2/ḄS - Main link: list of characters, s    e.g. "A4"
O               - cast to ordinal (vectorises)        [65,52]
  ⁹             - literal 256
 +              - add (vectorises)                    [321, 308]
   B            - convert to binary (vectorises)      [[1,0,1,0,0,0,0,0,1],[1,0,0,1,1,0,1,0,0]]
    ṫ€3         - tail €ach from index 3              [[1,0,0,0,0,0,1],[0,1,1,0,1,0,0]]
       F        - reduce with concatenation           [1,0,0,0,0,0,1,0,1,1,0,1,0,0]
        Œg      - group runs of equal elements        [[1],[0,0,0,0,0],[1],[0],[1,1],[0],[1],[0,0]]
          ;2/   - pairwise reduce with concatenation  [[1,0,0,0,0,0],[1,0],[1,1,0],[1,0,0]]
             Ḅ  - convert from binary (vectorises)    [32,2,6,4]
              S - sum                                 44
```
[Answer]
# PHP, 116 Bytes
```
for(;$c=ord($argn[$i++]);)$r.=sprintf("%07b",$c);$t=mb_split("(?<=0)(?=1)",$r);echo array_sum(array_map(bindec,$t));
```
[Online Version](http://sandbox.onlinephpfunctions.com/code/2430f87c492fe9886e8ace92c12115099adeac35)
# PHP, 117 Bytes
```
for(;$c=ord($argn[$i++]);)$r.=sprintf("%07b",$c);$t=preg_split("#0\K(?=1)#",$r);echo array_sum(array_map(bindec,$t));
```
[Try it online!](https://tio.run/nexus/php#JckxCsIwFADQvaeQNEI@LVInhxg6SAcRdHFTCWmapoE2Cb9xcPHqVXR78PZ1HGJmEANKNDFgct6ydyPPl@vx0ADPqELrBdGhMzaMPeFLH5BxqkXAjv32Rl1RPIADxY2YIzqfekbW1a4lJdXAaRIRjZVzHF1iJK/uJ1aLLeTfRuBGD2GlENVLzs@J/TWpyFrnO6NLmgD4snwA "PHP – TIO Nexus")
# PHP, 120 Bytes
```
for(;$c=ord($argn[$i++]);)$r.=sprintf("%07b",$c);preg_match_all("#1+0+#",$r,$t);foreach($t[0]as$b)$s+=bindec($b);echo$s;
```
[Try it online!](https://tio.run/nexus/php#HcyxCsMgFEDRPZ9hX0ExlHTqYKVDydClXbqFIMYYFVKVp3N/PQ0dLwfu9ZZ9bixiQoU2J6whOvrt1fP1ftx7JhrQ6KIkJs3WpXUhYlsSUgFGJpzpXwcInI9MMMCTLBlDrAslx@4ykRYMExmtUx9djVd6XSk5nHnHD7thC5WJ/We18RTq0I26wMSgcDmFOFtD9xLW@ARFbNsP "PHP – TIO Nexus")
or 
```
for(;$c=ord($argn[$i++]);)$r.=sprintf("%07b",$c);preg_match_all("#1+0+#",$r,$t);echo array_sum(array_map(bindec,$t[0]));
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 21 bytes
It's too long...
```
siR2:.BiCMQ128"1+0+"1
```
[Test suite.](http://pyth.herokuapp.com/?code=siR2%3A.BiCMQ128%221%2B0%2B%221&test_suite=1&test_suite_input=%22a%22%0A%22A4%22%0A%22codegolf%22%0A%22Hello%2C+World%21%22&debug=0)
[Answer]
# [F#], ~~249~~ 245 bytes
```
open System
let rec c a=function|[]->[a]|'0'::'1'::y->(a+"0")::(c""('1'::y))|x::y->c(a+string x)y
let x i=c""(String.Join("",(Seq.map(fun c->Convert.ToString(int c,2).PadLeft(7,'0'))i))|>Seq.toList)|>Seq.map(fun c->Convert.ToInt32(c,2))|>Seq.sum
```
[Try it online!](https://tio.run/nexus/fs-mono#bZFRa8IwFIXf/RV3gWHC2uKcInZYkL1sw4dBhT2ID1l6K4GYdE0cEfrfu7QVhrg8BHK/c@894ZgKNeRn6/A4UuhA6urkLKxg14zg@hBOIpgtn2/q61kHZrdAmAIPRpUBzxeTW/6KSpkIPk2tirsgWizn15pm33amahQggK/KkxZOGt3s9nG24/tmPBmn6fgxXN7GGeUPZEJYmlJBCL2UGWv8gEXg1tVSH8Azb/vvepCrTpz39eTdSE0JiWiO38mRVzRsBBFnL0b/YO2SrRmEVGoHIpqy5IMXGywdXUTBC2MyrMu6Zmc20rrL499Jb9o9TWk35KKyp2O7rmt@TkpTc6Wg76F9IhGgr1A4LBjEGVA/BMVCUH9gyG7UZFAFk67UQLZoQ5oVtxaLFO6/SNu2vw "F# (Mono) – TIO Nexus")
Note: the version on tio.run has "open System" in the header, I've added its count to the code above.
I'm not sure what the rules are on imports.
# Ungolfed
```
let rec convert acc = function
    | [] -> [acc]
    | '0'::'1'::xs -> (acc + "0") :: (convert "" ('1'::xs))
    | x::xs -> convert (acc + string x) xs
    
let calculateSum input =
    let binary = Seq.map (fun x -> Convert.ToString(int x, 2).PadLeft(7, '0')) input
    String.Join("", binary)
    |> Seq.toList
    |> convert ""
    |>Seq.map (fun x -> Convert.ToInt32(x, 2))
    |>Seq.sum
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 60 bytes
```
->s{s.bytes.map{"%07b"%_1}.join.scan(/1+0*/).sum{_1.to_i 2}}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsEiN9ulpSVpuhY3bXTtiquL9ZIqS1KL9XITC6qVVA3Mk5RU4w1r9bLyM_P0ipMT8zT0DbUNtPQ19YpLc6vjDfVK8uMzFYxqayFmrCxQcItWcjRRioXwFyyA0AA)
[Answer]
# [Perl 6](http://perl6.org/), 62 bytes
```
{sum map {:2(~$_)},.comb».ord».fmt('%07b').join~~m:g/11*0*/}
```
[Answer]
# [J](http://jsoftware.com/), 34 bytes
```
[:+/@(,#.;.1~1,1=2#.\,)(7#2)#:3&u:
```
[Try it online!](https://tio.run/nexus/j#@5@mYGulEG2lre@goaOsZ61nWGeoY2hrpKwXo6OpYa5spKlsZaxWasXFlZqcka@QpqCeqA5nOpog2Mn5Kanp@TlpCBGP1JycfB2F8PyinBRF9f//AQ "J – TIO Nexus")
## Explanation
```
[:+/@(,#.;.1~1,1=2#.\,)(7#2)#:3&u:  Input: array of characters S
                              3&u:  Get ASCII values of each character
                       (7#2)        Array with 7 copies of the value 2
                            #:      Convert each value to a base 2 array with length 7
[:  (                 )             Operate on those binary values
                     ,                Flatten it
                 2  \                 For each infix of size 2
                  #.                    Convert it to decimal from binary
               1=                     Test each value for equality to 1
             1,                       Prepend a 1
      ,                               The flattened binary values
         ;.1~                         Chop that at each occurrence of a 1
       #.                               Convert each chop from binary to decimal
 +/@                                Reduce by addition
```
[Answer]
## mathematica 193 bytes
```
f=FromDigits;l=Flatten;(S=Split@l@Table[PadLeft[IntegerDigits[ToCharacterCode@#,2][[k]],7],{k,StringLength@#}];Plus@@Table[f[RealDigits@f@Join[S[[i]],S[[i+1]]],2],{i,1,Length@S-1,2}]+Last@l@S)&
```
[Answer]
# [J](http://jsoftware.com/), 40 bytes
```
+/>#.&.>(1,}.|.1 0 E.|.b)<;.1 b=.,#:a.i.
```
usage:
```
+/>#.&.>(1,}.|.1 0 E.|.b)<;.1 b=.,#:a.i.'A4'
```
returns 44
[Answer]
## Clojure, 150 bytes
```
#(loop[[c & C](for[i % j[64 32 16 8 4 2 1]](mod(quot(int i)j)2))p 0 r 0 R 0](if c(if(=(dec c)p 0)(recur C c 1(+ R r))(recur C c(+(* 2 r)c)R))(+ R r)))
```
Well I was hoping the conversion from ASCII to bytes was shorter than this. The actual loop body is quite short, using `r` to accumulate the current result and `R` to accumulate the total result. If the previous bit `p` is `0` and the current bit `c` is `1` then we split a new chunk and accumulate to `R`, otherwise we update the `r` and keep `R` as it was.
[Answer]
# **Python** 123 bytes
```
lambda w:sum(map(lambda x:int(x,2),"".join(map(lambda x:bin(ord(x))[2:].zfill(7),list(w))).replace("01","0:1").split(":")))
```
Updated, thanks to Martin Ender.
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), 31 bytes
**Solution:**
```
+/2/'_[;x]&x&~~':x:,/(7#2)\'`i$
```
[Try it online!](https://tio.run/##y9bNz/7/X1vfSF89Ptq6IlatQq2uTt2qwkpHX8Nc2UgzRj0hU0UpOT8lNT0/J03p/38A "K (oK) – Try It Online")
**Examples:**
```
+/2/'_[;x]&x&~~':x:,/(7#2)\'`i$,"a"
49
+/2/'_[;x]&x&~~':x:,/(7#2)\'`i$"A4"
44
+/2/'_[;x]&x&~~':x:,/(7#2)\'`i$"codegolf"
570
+/2/'_[;x]&x&~~':x:,/(7#2)\'`i$"Hello, World!"
795
```
**Explanation:**
Convert to ASCII values, convert to 7-bit binary, flatten, find where differs, and against original list to find where `1`s differ. Cut at these indices, convert back to decimal and sum up:
```
+/2/'_[;x]&x&~~':x:,/(7#2)\'`i$ / the solution
                            `i$ / convert to integer
                     (7#2)      / draw from 2, 7 times => 2 2 2 2 2 2 2
                          \'    / decode each (convert to binary)
                   ,/           / flatten
                 x:             / save as x
             ~~':               / not-not-each previous (differ)
            &                   / and with
           x                    / x
          &                     / indices where true
     _[;x]                      / projection, cut x at ...
  2/'                           / encode each (convert from binary)
+/                              / sum up
```
**Bonus**
Managed a **31 byte** version in [K4](http://kx.com/download/) too, but as there's no TIO for it I'm posting my oK solution.
```
+/2/:'_[;x]@&x&~~':x:,/1_'0b\:'
```
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 30 bytes
```
{+/2⊥¨(1∘+⊆⊢)∊¯7↑¨2⊥⍣¯1¨⎕UCS⍵}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R24RqbX2jR11LD63QMHzUMUP7UVfbo65Fmo86ug6tN3/UNvHQCpDso97Fh9YbHlrxqG9qqHPwo96ttUDNCuqJ6lxA0tEETCXnp6Sm5@ekgTkeqTk5@ToK4flFOSmK6gA "APL (Dyalog Unicode) – Try It Online")
**How?**
`⎕UCS⍵` - Unicodify
`2⊥⍣¯1¨` - encode each in binary
`¯7↑¨` - and pad to the left with zeros to 7 places
`∊` - flatten
`1∘+⊆⊢` - partition by self increased by one
`2⊥¨` - decode each from binary
`+/` - sum
[Answer]
# [Factor](https://factorcode.org/) + `math.unicode`, 73 bytes
```
[ [ "%07b"sprintf ] map-concat R/ (?<=0)(?=1)/ re-split [ bin> ] map Σ ]
```
[Try it online!](https://tio.run/##ZY/BSgMxEIbveYppQGjB3a6wZWlrWzypFw@KeCg9pOnsGoxJnEyhIj6N7@Mrrak5WPC/zA/fDPP/rdLsqX98uL27nkHr6VUxG9dBms9lUBSRst87o/0OIRAyvwcyjoGww0OAiG97dBrjnyvxwKQizIX4EJAklYRTDaBYQj3N7KqW/1md2fFp520rT9ikqTK8QWv9OTx5sruBzLCZTsSn6NewBnlWNVsZf8O2sElFQqG904rhfgzD1eWiGg1Xi4vROFUpYrCG09XWuGVehu8v2PRHE1npl7L/AQ "Factor – Try It Online")
* `[ "%07b"sprintf ] map-concat` Convert each code point in the input string to a 7-bit binary number string and join them all together.
* `R/ (?<=0)(?=1)/ re-split` Split into a sequence of strings down the middle of every `01`.
* `[ bin> ] map Σ` Convert each from binary string to decimal integer and sum.
]