in Digital Logic recategorized by
653 views
2 votes
2 votes

A palindrome reads the same forwards and backwards. (For example, $10101$ and $1001$ are palindromes). Suppose you want a machine that takes a number with the four binary digits and outputs a $1$ only if the number is a palindrome.
You can build this with two XOR gates, one NOT gate, and which other extra kind of gate?

  1. AND
  2. OR
  3. XOR
  4. NOT
in Digital Logic recategorized by
653 views

1 Answer

2 votes
2 votes
Applied Course 2019 Mock1-39
We want to check if A and D are equal, and B and C are equal; if so we have a palindrome.
A $XOR$ D will return $0$ if the inputs are same.
B $XOR$ C will return $0$ if the inputs are same.
Therefore we need to check if both of those expressions are $0$, that is NOT ((A XOR D) OR (B XOR C)).
Answer:

Related questions