Thread: Implementing divison for bignum ?

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    71

    Implementing divison for bignum ?

    Hi..

    Can any 1 help me in figuring out how to implement division for arbitrary sized integers ?
    I have implemented + , - , * operators..

    i am unable to figure out how to implement long division ..

    Any help would be appreciated :-)

    Thanks !

  2. #2
    Registered User
    Join Date
    Feb 2010
    Posts
    57

    Re: implementation of division operator

    I think we can do division operation by using bitwise right shift operator.
    Ex:
    x=10
    x/2 it will give 5
    x>>2 also gives 5.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,169
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Implementing IRC protocol
    By cs_student in forum Networking/Device Communication
    Replies: 6
    Last Post: 07-14-2009, 11:25 AM
  2. Implementing of queue using objects?
    By Argo_Jeude in forum C++ Programming
    Replies: 5
    Last Post: 08-07-2007, 11:55 AM
  3. Implementing Mathematical Concepts in Code
    By MisterWonderful in forum Tech Board
    Replies: 6
    Last Post: 03-08-2004, 07:44 AM
  4. Implementing a linked list, some problems
    By EvBladeRunnervE in forum C++ Programming
    Replies: 7
    Last Post: 12-12-2003, 09:07 AM
  5. I need help with implementing strings???
    By atif in forum C Programming
    Replies: 8
    Last Post: 04-07-2002, 10:04 AM