Results 1 to 5 of 5

Thread: 1's complement number

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2005
    Posts
    27

    1's complement number

    does anyone know how to find the decimal equivalent of the four-bit one's complement number: 1111

  2. #2
    College Grad!!! Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,299

    Re: 1's complement number

    Isn't that 15? If you would have done this:

    0000 - 0
    0001 - 1
    0010 - 2
    0011 - 3
    0100 - 4
    0101 - 5
    0110 - 6
    0111 - 7
    1000 - 8
    1001 - 9
    1010 - 10
    1011 - 11
    1100 - 12
    1101 - 13
    1110 - 14
    1111 - 15

    you would have seen it.

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: 1's complement number

    I think it's zero. Because the first bit is the sign bit and if it's one then you inverse the rest of them. So you get negative zero, zero.

    Are you asking for assembly code or just theory here?

    Edit: Oh and Jacob, isn't it a bit easier to do this...
    1111 = 1+2+4+8 = 15 ...

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: 1's complement number

    It's indeed 0, or more precisely, -0. 1's complement has the concept of negative 0.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2005
    Posts
    27

    Re: 1's complement number

    thanks penagate and CornedBee. your answer makes sense to me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width