Square a number in NASM assembly without multiplication
Posted
by Voltin
on Stack Overflow
See other posts from Stack Overflow
or by Voltin
Published on 2010-04-11T01:14:51Z
Indexed on
2010/04/11
1:23 UTC
Read the original article
Hit count: 425
Is it possible to square a number stored in a register (say eax) without doing any multiplication (by using shifts, etc)? I will be squaring a 16-bit number in 32-bit assembly so overflow shouldn't be an issue. I am using NASM x86 assembly to create the program. Thanks in advance for your help.
© Stack Overflow or respective owner