[SOLVED] Two's complement: Are there any algebraic 'hidden' properties ?

Status
Not open for further replies.

andre_luis

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,593
Helped
1,190
Reputation
2,399
Reaction score
1,207
Trophy points
1,403
Location
Brazil
Activity points
55,667
I am studying to make a test for the engineering position in a large company where I live, and I am using a test applied few years ago, and I got stucked with one of the questions, which is:


The first thing that came to mind was to recursively apply the "Two's Complement" rule:



Which rearranged, give:



So, replacing each of the last 2 variables at original equation,



Adding the numerals,



Doing the same for the first 2 variables,



And the same for the upper bar,



Gathering numerals,



But from here I'm stuck.

I wonder if I'm overlooking some elementary boolean rule.
I'm not sure if I can apply a distributive property to the (') complement operator:



Rearranging,



In a different format,



And knowing that the complement means an algebraic signal inversion,



Rearranging,



However, correct answer (which I could confirm with random numerals at X and Y) is :


Does anyone have any insight on how to solve that?
 
Last edited:

I've some difficult in finding the error in your derivation, I should read it more carefully. However, I would proceed as follow:

-A=A_+1 from which A_=-A-1. Applying it to your expression we obtain:

-[-(x+y)-1 -x-1 -y-1]-1 = x+y+1+x+1+y+1-1 that is:

2x+2y+2
 
Your approach seems more consistent, once you are dealing with the variables only using the algebraic property of signal inversion, whereas I also made the distributive operation - which now I realize that is not applicable here. Thank you, the question surely have been solved.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…