dolomiti7 wrote
Also I find some of the old explanatory comments in the HDL files clearer, but that is just a personal preference.
Example from Xor.hdl, previously:
/**
* Exclusive-or gate:
* out = not (a == b)
*/
versus now:
/**
* Exclusive-or gate:
* out = (((a == 0) & (b = 1)) | ((a == 1) & (b = 0)), 1, 0)
*/
I would tend to agree. The problem I see with the old description is that a lot of readers use those expressions as though they represent a direct mapping to how to implement the logic, and there's nothing available to implement (a == b), so they get stumped.
But the new version is confusing on a few fronts. First, it uses both '==' and '=' in the same expression, implying that the distinction is important.
Second, the interpretation of the syntax (a,b,c) is not clear (I don't know if it is defined anywhere). This seems to be patterned after the C conditional (ternary) operator (which Java does support).
Given the information provided by Fig 1.7 of the 2nd edition, I don't think it would be giving to much away to just give the blueprint patterned there:
* out = (not(a) and b) or (a and not(b))