goldi697
Newbie level 5
hello,
in my code i am using (1 10 5) word length format, 1 bit is for sign, 10 for integer and 5 for fraction, i want to add two 16 bit numbers in this format, means as per the sign bit addition or subtraction should be performed and final result should also in this format. please help me for that addition. i am doing addition by using if else, every time i check sign then i will perform 2's comp then again i m checking for magnitude to decide the sign of final result, its working but at the time of sythesis it map 10 adder instead of one because i m using if else condition.
in my code i am using (1 10 5) word length format, 1 bit is for sign, 10 for integer and 5 for fraction, i want to add two 16 bit numbers in this format, means as per the sign bit addition or subtraction should be performed and final result should also in this format. please help me for that addition. i am doing addition by using if else, every time i check sign then i will perform 2's comp then again i m checking for magnitude to decide the sign of final result, its working but at the time of sythesis it map 10 adder instead of one because i m using if else condition.