Assume that X consists of 4 bits, x3 x2 x1 x0, and Y consists of 4 bits, y3 y2 y
ID: 3679674 • Letter: A
Question
Assume that X consists of 4 bits, x3 x2 x1 x0, and Y consists of 4 bits, y3 y2 y1 y0,
where bit 0 is the least significant bit and bit 3 is the most significant bit. Write logic functions that are
true if and only if
(a) (5 points) X < Y, where X and Y are thought of as unsigned binary numbers.
(b) (5 points) X < Y, where X and Y are thought of as signed (two’s complement) numbers.
(c) (5 points) X = Y.
(Extra) Use a hierarchical approach that can be extended to larger numbers of bits.
Show how can you extend it to 8-bit comparison (that is, if X and Y are 8-bit numbers, how to
implement the above three comparisons).
Explanation / Answer
x3(Exor)y3+x2(Exor)y2+x1(Exor)y1+x0(Exor)y0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.