I have a problem with understanding the attached ALU (6 control bits)
Important is to understand how negative numbers in binary work. 

2 bit Two's complement (how to pass from positive 1 to negative 1):

var  binary   decimal
 a    01         1
!a    10         undefined with 2 bits
!a+1  11         -1


3 bit two's complement (same as before)

var  binary   decimal
 a    001         1
!a    110         -2
!a+1  111         -1


So from here we can see that just inverting the variable/output is the negative/inverse (multiplied by -1) representation of the output -1.

!x = -x-1
!(x+y) = -(x+y)-1 = -x-y-1
!(!x+y) = -(-x-1+y)-1 = x+1-y-1 = x-y
!(!x+!y) = -(-x-1-y-1)-1 = x+y+1




Here is an approach (with thought process) that might help you.

Starting from the output, working your way to the input you can see the following:
Output is Q
Before the last Mux lets call it Q'


n0 selects is you want Q' or !Q'


Lets call the last muxer M and the before last M'


f selects Output from the One bit ADDER or from the AND


Looking at what comes out of the initial MUXs on the left you can see that n(x/y) and z(x/y) select what gets input to the AND and the ADDER.



so given that you are looking for each of the following cases:

" 0-x, x-y, y-x, x+1, y+1 " 

you can already conclude that f needs to select the output from the adder, so f=1



y+1, x+1, 0-x only involve one variable either x or y so the other one will be a fixed value either 0 or 1 (+5V)

y+1:  --> zx = 1

x+1, 0-x : --> zy = 1



y+1 and x+1 seems as simple additions but you have no way of representing a +1, if you set nx or ny to 1 you will respresent a "-1" , so you can change x+1 to x-(-1)

so after solving the x-y or y-x you should be able to figure that out.

so x - y is adding x to the 2 complement negative representation of y, that is x+!y+1 , but where are you going to get that +1 from? 

Think about what inverting the output of the adder will do...If you negate the output of the adder you will get the negative representation of the sum -1 

e.g. 2+1 = 3  --> !3 = -4 --> -(2+1)-1

e.g. -2-1 = -3 --> !(-3) = 2 --> -(-2-1)-1 

!(x - y) --> -(x-y)-1 = -x + y -1 = y-x-1 = y +(-x) -1

-x --> !x +1 

y + !x +1 -1 --> y + !x

so, that defines that for x-y we want 

y pass through , ny = zy  = 0, 

x inverted , nx = 1, zy =0

f = 1 , output of the adder

n0 = 1, adder output inverted

I believe you should be able to figure out the rest from here on.

Cheers,
Pau