You are given two binary numbers A and B of the same length. Compute the five bitwise results A & B, A | B, A ^ B, ~A, and ~B.
Every operation is applied position by position. A bit of & is 1 only when both bits at that position are 1. A bit of | is 1 when at least one of them is 1. A bit of ^ is 1 when the two bits differ. ~ turns each 0 into 1 and each 1 into 0.
Each result is a binary number of the same length as the input, and its leading zeros stay in place.