Thread: I have a binary ?. folks?

  1. #1
    TransparentMember correlcj's Avatar
    Join Date
    Jun 2002
    Posts
    378

    I have a binary ?. folks?

    Hello again,


    X=1100110000110011
    Y=0000111100001010

    what is the binary representation of Y>>4?

    my answer is...
    0000000011110000

    is this correct?
    "Be formless, shapeless, like water... You put water into a cup, it becomes the cup, you put water into a bottle, it becomes the bottle, you put it in a teapot, it becomes the teapot... Now water can flow, or it can crash, be water my friend."
    -Bruce Lee

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Write a program to find out.
    Code:
    void printbits( unsinged long int x )
    {
        long int y;
        for( y = 0; y < sizeof( unsinged long int ) * 8; y++ )
            printf("%d",(x&(1<<y)));
    }
    But yeah, that would be correct.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    TransparentMember correlcj's Avatar
    Join Date
    Jun 2002
    Posts
    378

    Write a program to find out.

    I did not have to Q, I already knew.
    Look I am a poet and didn't know it.
    Later gator!
    stay real!
    "Be formless, shapeless, like water... You put water into a cup, it becomes the cup, you put water into a bottle, it becomes the bottle, you put it in a teapot, it becomes the teapot... Now water can flow, or it can crash, be water my friend."
    -Bruce Lee

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826

    Re: Write a program to find out.

    Originally posted by correlcj
    I did not have to Q, already knew.
    Look i am a poet and didn't know it.
    Later gator!
    stay real!
    If you already knew, then what was the point of even posting? I have better things to do than to answer questions you already know the answer to.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    TransparentMember correlcj's Avatar
    Join Date
    Jun 2002
    Posts
    378

    If you already knew, then what was the point of even posting? I have better things to

    If you had better things to do then why are you here on the computer then?
    "Be formless, shapeless, like water... You put water into a cup, it becomes the cup, you put water into a bottle, it becomes the bottle, you put it in a teapot, it becomes the teapot... Now water can flow, or it can crash, be water my friend."
    -Bruce Lee

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. arrays vs lists? And containers in general!
    By clegs in forum C++ Programming
    Replies: 22
    Last Post: 12-03-2007, 02:02 PM
  2. Replies: 0
    Last Post: 11-04-2006, 11:07 AM
  3. 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
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 09:40 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