Results 1 to 2 of 2

Math Help - Representing two's compliment

  1. #1
    Junior Member
    Joined
    Oct 2009
    Posts
    31

    Representing two's compliment

    Can I write that the two's compliment of an 8-bit binary number, n is:
    -n=\bar{n}+1 ?

    Or is that simply wrong notation? Is there a correct way of showing this?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5
    Let n a numer represented by N bits and suppose to indicate with \bar{n} the numer obtained by n complementing each of its bit. Is...

    n+\bar{n}= 2^{N}-1 \implies \bar{n} +1 = (2^{N} - n)\ mod(2^{N})= -n (1)

    ... so that Your notation is correct...

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. why can't arithmatic be done in one's compliment
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: January 9th 2012, 04:53 PM
  2. Replies: 0
    Last Post: December 11th 2011, 03:24 PM
  3. 2's compliment
    Posted in the Discrete Math Forum
    Replies: 3
    Last Post: September 13th 2011, 01:46 PM
  4. [SOLVED] Finite Compliment Topology
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: March 9th 2011, 11:46 AM
  5. Intersection, Union, and Compliment of sets
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: October 7th 2008, 09:34 AM

Search Tags


/mathhelpforum @mathhelpforum