I want to design a divider using cordic function, for high number / low number (30/2) can anyone help me.?

4 views (last 30 days)
I have already design the divider using cordic, but this is working only for when numerator is low and denomerator is high.
for example : x/y , 6/20 = 0.3. but when i give 20/6 it shows output is 1.
x = 6;
y = 20;
z = 0;
format long
k = zeros(20,3);
for i = 1:20
if x > 0
x = x - y*2^(-i);
z = z + 2^(-i);
x = x + y*2^(-i);
z = z - 2^(-i);
k(i,:) = [i 6/20 z];
Can anyone help ,how to design the divider using the cordic for higher number / Lower number (eg : 30/2).

Accepted Answer

Walter Roberson
Walter Roberson on 18 May 2022
Do not start with i=1. Start with i being the negative of the number of bits before the decimal place.
I believe that your else is incorrect. I believe you should be working with 2^(-(i-1)) so that you "undo" the previous step

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!