I'm keen on understanding how the algorithm works. I've understood bits and bobs via
https://www.youtube.com/watch?v=UZBZPOEVyJA and the excel file associated with it.
I am struggling to understand what these values mean in excel however:
MID(HEX2BIN(IF(ISERROR(MID(D13,LEN(D13),1)),0, MID(D13,LEN(D13),1)),4),4,1)
I get what hex2bin means (hex to binary) but what does the rest actually mean? Am I right in assuming "mid" would mean middle range or something similar.
Please help if you have a better understanding of the formula and bitcoin algo
MID is actually taking a substring with these parameters
MID( text, start_position, number_of_characters )
So lets start with
IF(ISERROR(MID(D13,LEN(D13),1)),0, MID(D13,LEN(D13),1))
This chunk of code means
If the last character of D13(substring of 1 character starting at the character at the length of D13) is an error, then output is 0. Otherwise the output is the last character
The output of the if statement goes into HEX2BIN which takes paramters
HEX2BIN(number, [places])
where number is the number and places is the number of characters to use. In this case, 4.
The remaining code comes out to mean
The substring of the output of the 4 character hex to bin conversion of the last character of D13 or 0 starting at the 4th character with a size of 1 character.
Basically it is taking the last character of the binary output of either the last character of D13 or 0.