The result of zy and ny is that y is zeroed and then bitwise negated, so it will be 1111 1111 1111 1111 (or -1 in decimal). You seem to be under the impression that it will be 1 (boolean not). Let's examine x = 4, zx = 0, nx = 1, zy = 1, ny = 1, f = 1, no = 1
Many thanks! Yes, I indeed managed to confuse myself by thinking that flipping 0 got you 1, probably because I was thinking of the 0 as a single bit and not the full n bits.
As an aside, it's really interesting for me from the standpoint of how my (broken) brain works, because I was really was thinking in terms of bit-flipping (ie. trying to puzzle through the algebra on paper, I was writing things like f(x) = 2^n - x - 1). Hard to get what I'm trying to express. It's not a case of consistently thinking a wrong thing such that correcting that wrong view fixes the problem. It's more like a sort “flaky wiring” where you can think the right thing in one half of a sentence and then somehow switch to thinking the exact opposite in the other half!