Display the exponent from a binary floating point number as a decimal value Had my software final exams recently, one of the last questions had me thinking for a while after the exam had finished.
Background
IEEE754 numbers are according to the below layout

The exponent is stored as n + 127 so for an exponent of 20 the exponent in binary would be:
127 + 20 = 147 then
10010011
The Challange
Write a program that when given text representing a binary floating point number to the IEEE754 standard, returns the exponent given as a decimal value.
Example
Input: 00111101110011001100110011001101 (0.1)
Isolated exponent bits: 01111011
Convert to binary: 0 + 64 + 32 + 16 + 8 + 0 + 2 + 1 = 123
Remove offset: 123 - 127 = -4
Output -4

Input: 10111111110111101011100001010010 (-1.64)
Isolated exponent bits: 01111111
Convert to binary: 0 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 127
Remove offset: 127 - 127 = 0
Output 0
Rules

Input must be text/string/equivalent indexable datatype, eg. strings not integer or numerical
Output can be any type, as long as it is decimal
Aim for shortest solutions


Adapted from the 2020 Software Design and Development HSC Paper: 30) d) ii

Design an algorithm that takes in a string of 32 characters representing
a floating point number, and displays the exponent as its signed decimal
value.

Any feedback is appreciated as this is my first question
Haskell, 33 bytes

foldl1(\x y-&gt;x*2+y-1).take 8.tail

Try it online!
Input is a list of integers 0 or 1.
It's slightly shorter to foldl1 by x*2+y-1 than to subtract 127 at the end. This works because
  foldl1 (\x y-&gt;x*2+y-1) [a,b,c,d,e,f,g,h]
= ((((((a*2+b-1)*2+c-1)*2+d-1)*2+e-1)*2+f-1)*2+g-1)*2+h-1
= a*128 + b*64-64 + c*32-32 + d*16-16 + e*8-8 + f*4-4 + g*2-2 + h-1
= 128a + 64b + 32c + 16d + 8e + 4f + 2g + h - 127
= fromBinary[a,b,c,d,e,f,g,h]-127