Thread: How to manipulate binary?

  1. #1
    Registered User
    Join Date
    Oct 2013
    Posts
    1

    How to manipulate binary?

    hi my assignment is to write a binary calculator that works with floating point for simple math (+,-,x,/). i have no idea how to do this. the binary numbers need to be from the user. Any help would be appreciated.


    Thanks in advance!

  2. #2
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    https://en.wikipedia.org/wiki/Binary_numeral_system

    We don't give handouts here, please try again.

  3. #3
    Stoned Witch Barney McGrew's Avatar
    Join Date
    Oct 2012
    Location
    astaylea
    Posts
    420
    You could start out by implementing this function:
    Code:
    #include <stdio.h>
    
    /* readbin converts a number encoded in binary to a C 'double' value and stores
     * it in *dp. Returns 1 on success, 0 on failure, and EOF if an error or
     * end-of-file occurred on iop. */
    int readbin(double *dp, FILE *iop);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't manipulate variable!
    By smithc2005 in forum C Programming
    Replies: 2
    Last Post: 10-22-2008, 07:18 AM
  2. Manipulate bytes
    By davide_82 in forum C Programming
    Replies: 8
    Last Post: 11-02-2005, 03:46 AM
  3. Manipulate a string?
    By nvrmaried in forum C++ Programming
    Replies: 4
    Last Post: 09-22-2003, 02:23 PM
  4. How to manipulate a string
    By Basia in forum C Programming
    Replies: 4
    Last Post: 09-29-2002, 09:35 PM