Initial state
Translated first half of the function to bitwise
Implemented bitwise algorithm