Java implementation of Booth's multiplication algorithm and the modified Booth algorithm