We replaced this with roughly the following, based on bitwise operations on 960-marker blocks: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document} $$ m^{\prime} := 960\left\lceil \frac{m}{960}\right\rceil $$ \end{document}m′:=960m960 Pad the ends of {ai} and {bi} with ϕs, if necessary Ai:={012 if ai=ϕ,002 if ai=0,102 if ai=1,112 if ai=2} Bi:={012 if bi=ϕ,002 if bi=0,102 if bi=1,112 if bi=2} Ci:={002 if ai=ϕ,112 otherwise} Di:={002 if bi=ϕ,112 otherwise} diff := 0 obs := 0For i∈{1,961,1921,…,m′−959}: E:=Ai..i+959XORBi..i+959F:=Ci..i+959ANDDi..i+959diff := diff + popcount(EANDF)obs := obs + popcount(F)