|
-
Sep 18th, 2005, 11:22 PM
#1
Thread Starter
Junior Member
1's complement number
does anyone know how to find the decimal equivalent of the four-bit one's complement number: 1111
-
Sep 19th, 2005, 04:41 PM
#2
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.
-
Sep 19th, 2005, 10:33 PM
#3
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 ...
-
Oct 3rd, 2005, 06:00 AM
#4
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.
-
Oct 6th, 2005, 09:47 AM
#5
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|