De Morgan's laws
De Morgan's laws are Boolean identities stating that negating a conjunction yields the disjunction of the negated operands, and negating a disjunction yields their conjunction.
Quantum Programming in Depth
De Morgan's laws are Boolean identities relating negated conjunctions and disjunctions.
- How it is used
- Uses Boolean complementation to implement a reversible OR function on a quantum computer.
- How deep it goes
- Derives the identity and translates it into an X–CCNOT–X gate sequence, including restoration of modified inputs.
- Examples
- Demonstrates a two-input OR encoded as a three-bit reversible transformation with two input qubits and one output qubit.
- What you can do after
- Builds it from scratch by converting a Boolean OR expression into reversible quantum gates.
Read how Quantum Programming in Depth explains De Morgan's laws →
100 Java Mistakes and How to Avoid Them
De Morgan's laws state that negating a disjunction is equivalent to conjoining the negated operands, and negating a conjunction is equivalent to disjoining them.
- How it is used
- Prevents Boolean-condition mistakes in validation, filtering, and branch selection.
- How deep it goes
- Explains both equivalences through focused Java failures and corrected conditions, then notes limits of static analysis.
- Examples
- Uses byte-range validation, printable ASCII detection, and comment-line filtering as concrete failure cases.
- What you can do after
- Diagnose impossible or always-true conditions and rewrite manually negated Java expressions correctly.
Read how 100 Java Mistakes and How to Avoid Them explains De Morgan's laws →
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

