Question

Assume that a and b are 3-bit inputs (let a be a2a1a0 and b be b2b1b0)....

  1. Assume that a and b are 3-bit inputs (let a be a2a1a0 and b be b2b1b0).
    (a) Determine the Boolean expression (in terms of a2,a1,a0, b2,b1 and b0) for

    the relational operation a>b
    (b) Assume that b is a constant and that b = "101". Determine the Boolean

    expression again.
    (c) Assume that a is a constant and that a = "101". Determine the Boolean

    expression again.

0 0
Add a comment Improve this question Transcribed image text
Answer #2

(a) Determine the Boolean expression \(a > b\)


For two 3-bit binary numbers \(a = a_2a_1a_0\) and \(b = b_2b_1b_0\), to determine \(a>b\), we can compare from the highest bit to the lowest bit.


If \(a_2 = 1\) and \(b_2 = 0\), then no matter what value \(a_1,a_0,b_1,b_0\) takes, \(a>b\), that is, \(a_2\overline{b_2}\).


If \(a_2 = b_2\), we need to compare the next highest bit \(a_1\) and \(b_1\). When \(a_2 = b_2\) and \(a_1 = 1\), \(b_1 = 0\), there is also \(a>b\), that is, \(a_2b_2a_1\overline{b_1}+\overline{a_2}\overline{b_2}a_1\overline{b_1}=(a_2\oplus\overline{b_2})a_1\overline{b_1}\).


If \(a_2 = b_2\) and \(a_1 = b_1\), the lowest bits \(a_0\) and \(b_0\) need to be compared. When \(a_2 = b_2\), \(a_1 = b_1\) and \(a_0 = 1\), \(b_0 = 0\), \(a>b\), that is, \(a_2b_2a_1b_1a_0\overline{b_0}+\overline{a_2}\overline{b_2}a_1b_1a_0\overline{b_0}+a_2b_2\overline{a_1}\overline{b_1}a_0\overline{b_0}+\overline{a_2}\overline{b_2}\overline{a_1}\overline{b_1}a_0\overline{b_0}\)


To sum up, the Boolean expression \(a > b\) =


\[

\begin{align*}

a>b&=a_2\overline{b_2}+(a_2\odot b_2)a_1\overline{b_1}+(a_2\odot b_2)(a_1\odot b_1)a_0\overline{b_0}\\

\end{align*}

\]


Where \(x\odot y=\overline{x\oplus y}=xy + \overline{x}\overline{y}\) is the XOR operation, \(x\oplus y=x\overline{y}+\overline{x}y\) is the XOR operation.


### (b) Assume \(b\) is a constant, and \(b = "101"\)


At this time \(b_2 = 1\), \(b_1 = 0\), \(b_0 = 1\), substitute it into the expression of \(a > b\):


\[

\begin{align*}

a>b&=a_2\overline{1}+(a_2\odot 1)a_1\overline{0}+(a_2\odot 1)(a_1\odot 0)a_0\overline{1}\\

&=0 + a_2a_1+(a_2)(\overline{a_1})a_0\times0\\

&=a_2a_1

\end{align*}

\]


### (c) Assume \(a\) is a constant, and \(a = "101"\)


At this time \(a_2 = 1\), \(a_1 = 0\), \(a_0 = 1\), substitute it into the expression \(a > b\):


\[

\begin{align*}

a>b&=1\times\overline{b_2}+(1\odot b_2)\times0\times\overline{b_1}+(1\odot b_2)(0\odot b_1)\times1\times\overline{b_0}\\

&=\overline{b_2}+ 0+(b_2)(\overline{b_1})\overline{b_0}\\

&=\overline{b_2}+b_2\overline{b_1}\overline{b_0}

\end{align*}

\]


Summary:

- (a) \(a>b=a_2\overline{b_2}+(a_2\odot b_2)a_1\overline{b_1}+(a_2\odot b_2)(a_1\odot b_1)a_0\overline{b_0}\)

- (b) When \(b = 101\), \(a>b = a_2a_1\)

- (c) When \(a = 101\), \(a>b=\overline{b_2}+b_2\overline{b_1}\overline{b_0}\)


answered by: nusi bei
Add a comment
Know the answer?
Add Answer to:
Assume that a and b are 3-bit inputs (let a be a2a1a0 and b be b2b1b0)....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT