just checked, it kinda works though. u have to exclude the most significant bits that are 0. like 00110 is gonna be 110 instead. else it won't be correct cuz 110(2's compliment of 2)*010=01100. that is only correct if you exclude the 0 on the left. I haven't yet tested two negative numbers though, I'll do that later
edit: checked with 2 negative numbers. that doesn't work unfortunately. 2's compliment doesn't seem to work in general on multiplication, but if you use signed numbers instead, you can just XOR the signs and you get the sign for the result. you will have to calculate 2's compliment outside the multiplier though
edit: checked with 2 negative numbers. that doesn't work unfortunately. 2's compliment doesn't seem to work in general on multiplication, but if you use signed numbers instead, you can just XOR the signs and you get the sign for the result. you will have to calculate 2's compliment outside the multiplier though
<-- The actual Minecraft server host