Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Assume that X consists of 3 bits, x2 x1 x0, and Y consists of 3 bits, y2 y1 y0. Write logic functions that are true if and only if

X<Y, where X and Y are thought of as unsigned binary numbers

X<Y, where X and Y are thought of as signed (two’s complement) numbers

X=Y

Use a hierarchical approach that can be extended to larger numbers of bits. Show how can you extend it to 6-bit comparison.

Short Answer

Expert verified

The Logic function that are true if and only if

  • X<Y, where X and Y are unsigned binary numbers, let the equation be E1.

E1=x2¯.y2+(x2y2).(x1¯.y1)+(x2y2).(x1y1).(x0¯.y0)

  • X<Y , where X and Y are signed numbers

E2=x2.y2¯+(x2y2).x1¯.y1+(x2y2).(x1y1).x0¯.y0

  • X=Y

E3=(x2y2).(x1y1).(x0y0)

Step by step solution

01

Determine the logical gates and the functions

The logical functions are the combinations of the inputs and outputs of the truth table. The inputs be operated through the logical operators and the outputs are processed. Each Boolean expression can be represented through gates and the combinational circuits. The logical functions or expressions can be written from the conditions of the input and the output provided.

02

Determine the logic functions

Given, that X consist of three bits x2, x1, x0 and Y consists of three bits y2, y1, y0.

The logic functions should be written in way that are true if and only if

X<Y, where X and Y are thought of as unsigned binary numbers

X<Y, where X and Y are thought of as signed (two’s complement) numbers

First, the 1-bit comparison will be made as follows:

The truth tables for these conditions are as follows:

X<Y

X>Y

X==Y

For X<Y

X

Y

X<Y

0

0

0

0

1

1

1

0

0

1

1

0

(X<Y)=X¯.Y

For X>Y

X

Y

X>Y

0

0

0

0

1

0

1

0

1

1

1

0

(X>Y)=X.Y¯

For X==Y

X

Y

X==Y

0

0

1

0

1

0

1

0

0

1

1

1

(X==Y)=XY

From the above conditions, the logical equations can be derived.

X<Y, where X and Y are thought of as unsigned binary numbers

For an unsigned binary number, any of the following conditions must be satisfied.

x2<y2x2=y2&x1<y1x2=y2&x1=y1&x0<y0

Hence, the logical function is:

E1=x2¯.y2+(x2y2).(x1¯.y1)+(x2y2).(x1y1).(x0¯.y0)

The logical network:

By the hierarchical approach, the 6 bit extension is as follows:

X<Y, where X and Y are thought of as signed (two’s complement) numbers

For signed binary number, any of the following conditions must be satisfied.

x2>y2(signbit)x2=y2&x1<y1x2=y2&x1=y1&x0<y0

Hence, the logical function is:

E2=x2.y2¯+(x2y2).x1¯.y1+(x2y2).(x1y1).x0¯.y00

The logical network:

By the hierarchical approach, the 6 bit extension is as follows:

,X==Y

The logical function is,

E3=(x2y2).(x1y1).(x0y0)

The logical network is shown below:

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Question: Assign state numbers to the states of the finite-state machine you constructed for Exercise B.37 and write a set of logic equations for each of the outputs, including the next-state bits.

Assign state numbers to the states in the traffic light example of Exercise B.41 and use the tables of Exercise B.42 to write a set of logic equations for each of the outputs. Including the next-state outputs.

Assume that X consists of 3 bits : x2, x1, x0. Write four logic functions that are true if and only if

  • X contains only one 0
  • X contains an even number of 0s
  • X when interpreted as an unsigned binary number is less than 4
  • X when interpreted as a signed (two’s complement) number is negative.

Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5.P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and has a CPI of 2.2.

a. Which processor has the highest performance expressed in instructions per second?

b. f the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions.

c. We are trying to reduce the execution time by 30% but this leads to an increase of 20% in the CPI. What clock rate should we have to get this time reduction?

In addition to the basic laws we discussed in this section, there are two important theorems, called DeMorgan’s theorems:

A+B=A·BandA·B=A+B

Prove DeMorgan’s theorems with a truth table of the form

A

B

A

B

A+B

A·B

A·B

A+B

0

0

1

1

1

1

1

1

0

1

1

0

0

0

1

1

1

0

0

1

0

0

1

1

1

1

0

0

0

0

0

0

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free