Fundamental Gates...

Design a circuit that takes as input two 4-bit numbers x and y and produces a single bit in the output, such that when x = y its output is 1, and when x ≠ y its output is 0.

**Hint****: use four XNOR and one AND gate.**

Use two 2-to-4 DECODERS (with Enable bits) one INVERTER gate and
two AND gates to implement a 3-to-8 DECODER (with Enable bit).

This is a half adder.

This is a subtractor.

This is the AND gate with its truth table. It has 2 inputs (A, B) and 1 output (Out).

The 2 inputs (A, B) can be 0 or 1, and the users can change (0 to 1 or 1 to 0) the value, with a click on each small box of each input.

The output (Out) has connected a red led to signal if the output is 1 or 0 (1 is red led, 0 is led without color).