Thread: Binary Division in C?

  1. #1
    Unregistered
    Guest

    Binary Division in C?

    Hey, my friend asked me how to do binary division in C, but I don't know how. I am passing the question along to the board. This is what he asked me:


    How do you do:
    T = 1101100011000110001100 /100

    remainder = 000


    THanks for any help.

  2. #2
    Registered User JasonLikesJava's Avatar
    Join Date
    Mar 2002
    Posts
    175
    It is the same thing as base 10.

    1100 (12 base 10) / 10 (2 base 10) = 110 (6 base 10)


    If you want the answer of binary division as base 10 then just convert it after the dividing is done.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary division of large numbers
    By hooper in forum C Programming
    Replies: 5
    Last Post: 06-01-2007, 02:33 AM
  2. large binary number division
    By nappaji in forum C Programming
    Replies: 3
    Last Post: 08-08-2006, 01:54 PM
  3. large binary number division
    By nappaji in forum C++ Programming
    Replies: 1
    Last Post: 08-08-2006, 12:01 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM