title: How to create an 8-bit comparator with four 2-bit comparators?
body: <p>I am designing an 8-bit comparator in Xilinx ISE Project Navigator. My goal is to add four 2-bit comparators, as shown at the picture.  The input is a 16-bit literal, of which the first 8 bits are number A, the second are number B (SW(15:8) -> A; SW(7:0) -> B). There are two inputs BTN0 and BTN1, I use BTN0 to give the first comparator the EQ input value 1.
  In ISim, the comparison works fine if the two numbers are equal, but gets weird when I try with two different numbers. I am working from several sources and I'm a beginner at all this, so there could be easily a bug/error I didn't think about.
  <a href="http://25.media.tumblr.com/4e443e33d84b43e80e4f595b0044ab86/tumblr_mjd7vttpuc1r65yueo1_1280.png" rel="nofollow">http://25.media.tumblr.com/4e443e33d84b43e80e4f595b0044ab86/tumblr_mjd7vttpuc1r65yueo1_1280.png</a></p>