With the help of Steven, i am posting the solution.
def divide(dd,dr):
'''
let dd and dr be the dividend and divisor
x be the current macium divisor, less that dividend
c be the counter
q is the qutotient
'''
x=dr
c=0
#find the maxium number of time we need to iterate over dividend
#by increasing divisor exponentially
# i.e Determine how far left to shift the divisor.
#it will run lgx time ----------Loop1
while (x<<c) <= dd:
c+=1
print(c)
q=0
#then subtract from dividend and update result as usual manner
#will run c time i.e lgx time -----------Loop2
for j in range(c-1,-1,-1):
if x<<j <= drdd :
dr=drdd- =(x<<j)
q+=1<<j
print(q,dd)
'''
total time complexity will be 2lgx i.e lgx
'''
** Just Little bit doubt in the time complexity of loop1 and loop2.**
But this solution works.