## x86 Assembly

Moderators: None (Apply to moderate this forum)
Number of posts: 16011

This Forum Only

2's complement number Posted by indianj on 18 Sept 2005 at 9:26 PM
hello, does anyone know how to find the decimal equivalent of the four-bit two's complement number: 1000
Re: 2's complement number Posted by shaolin007 on 20 Sept 2005 at 6:12 AM
: hello, does anyone know how to find the decimal equivalent of the four-bit two's complement number: 1000
:

1000= 8

~8

0111= ~8
+
0001
----
1000= -8

Re: 2's complement number Posted by indianj on 20 Sept 2005 at 9:36 AM
i understand 2's complement, but i do not understand how did you get 8?
Re: 2's complement number Posted by shaolin007 on 20 Sept 2005 at 9:53 AM
: i understand 2's complement, but i do not understand how did you get 8?
:

8 4 2 1
1 0 0 0

Largest negative number for 4 bits is -8 while the biggest positive is 7.

Re: 2's complement number Posted by indianj on 20 Sept 2005 at 9:57 PM
finally, i get it. thanks for your help

## Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic