Thread: something about binary numbers in c

  1. #1
    Registered User
    Join Date
    Aug 2004

    something about binary numbers in c

    Hi, i was thinking about creating a program that would return to me the way the computer stores the data, however, it must be using binary code.

    i am not quite sure, i believe it first transforms the data ino a number and then to a binary, however it's a bit confusing.

    for example I have

    char b;


    I would like the user to know how the computer stores than 'a' as a binary numb.

    If someone knows, please help me,


  2. #2
    Super Moderator
    Join Date
    Sep 2001
    This is quite a common project - search the boards for a while and you'll find several threads along the same lines. You'll be sure to find some posts detailing algorithms for finding the individual binary bits. It requires that you're comfortable with some of the lesser-used operators in C, so make sure you're comfortable with topics like bit shifting and masking before giving this a serious attempt. Good luck!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. checking if binary numbers are palindromic
    By Beatz in forum C Programming
    Replies: 3
    Last Post: 01-24-2008, 01:49 PM
  2. searching and insertion in a binary search tree
    By galmca in forum C Programming
    Replies: 1
    Last Post: 03-26-2005, 05:15 PM
  3. Tutorial review
    By Prelude in forum A Brief History of
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  4. Binary representation of numbers...
    By roc in forum C++ Programming
    Replies: 2
    Last Post: 05-14-2003, 07:42 PM
  5. how to pack 8 x 4 bit binary numbers into a long int?
    By n00bcodezor in forum C Programming
    Replies: 11
    Last Post: 11-19-2001, 05:46 PM