liveBook · Manning

Logical XOR

Logical XOR is a binary operation that produces true when exactly one operand is true and false when both operands have the same truth value.

How 3 Manning books explain it

Math and Architectures of Deep Learning

A Boolean operation that outputs true when exactly one of its two binary inputs is true.

How it is used
Uses XOR to express exclusive conditions and motivate multilayer perceptrons beyond single-perceptron linear boundaries.
How deep it goes
Explains truth assignments, geometric nonseparability, and an MLP decomposition into complemented conjunctions, stopping short of learned parameter values.
Examples
Uses a rock-music friendship rule, four binary input points, a truth table, and a two-layer perceptron construction.
What you can do after
Build it from scratch by expressing XOR as two conjunction terms and combining their perceptron outputs in an MLP.

Read how Math and Architectures of Deep Learning explains logical XOR →

The Well-Grounded Rubyist, Fourth Edition

Bitwise XOR is a binary operation that produces 1 where exactly one corresponding input bit is 1 and produces 0 where both corresponding input bits are equal.

How it is used
Applies bitwise XOR to string bytes and demonstrates reversible obfuscation with a repeating key.
How deep it goes
Explains bit-level behavior, a numeric calculation, reversibility, and Ruby implementation with cycling keys.
Examples
Uses 97 ^ 35, a repeating-key string obfuscation example, and a reversible Ruby String#^ method.
What you can do after
Apply via Ruby to XOR string bytes with a repeating key and recover the original by repeating the operation.

Read how The Well-Grounded Rubyist, Fourth Edition explains logical XOR →

Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

The exclusive-or operation that returns true for exactly one true operand and false when both operands have the same truth value.

How it is used
Uses XOR to combine original bytes with dummy data and reconstruct the original through one-time pad encryption.
How deep it goes
Defines Boolean and bitwise behavior, demonstrates reversibility, and applies it in Swift encryption functions.
Examples
Demonstrates random OTP keys, encryptOTP(), decryptOTP(), and encrypting “¡Vamos Swift!” as byte sequences.
What you can do after
Apply XOR through Swift’s ^ operator to combine and reverse byte sequences in a one-time pad implementation.

Read how Classic Computer Science Problems in Swift: Essential techniques for practicing programmers explains logical XOR →

Related concepts

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.