Docsity

2 Problems on Binary Logic Structure Design - Exam | BME 303, Exams of Biology

Toggle sidebar
bg1
BME303 Midterm #1 Mar 6, 2008
Copyright © Orly Alter 2008
1
Last Name: First Name: UTEID:
Practice Midterm Instructions:
1. Each midterm must be stapled [50% score deducted otherwise].
2. Use this page as a cover.
3. Show details of your work, and explain in words, except in the most obvious cases.
4. Your work must be neat and clear.
5. Each section is 10%, unless it is specified differently, for a total credit of 260% +
50% extra credit.
Binary Logic Structures Design
1. Two-To-One Multiplexer (60%):
This multiplexer would output
Z=A when the selector is set at
S0=0, and Z=B when S0=1.
a. Fill-in the truth table for this two-to-one multiplexer
below:
Input
Output
S0
A
B
Z
0
1
0
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download 2 Problems on Binary Logic Structure Design - Exam | BME 303 and more Exams Biology in PDF only on Docsity!

Copyright © Orly Alter 2008

Last Name: First Name: UTEID:

Practice Midterm Instructions:

  1. Each midterm must be stapled [50% score deducted otherwise].
  2. Use this page as a cover.
  3. Show details of your work, and explain in words, except in the most obvious cases.
  4. Your work must be neat and clear.
  5. Each section is 10%, unless it is specified differently, for a total credit of 2 6 0% + 50% extra credit.

Binary Logic Structures Design

  1. Two-To-One Multiplexer (60%):

This multiplexer would output Z=A when the selector is set at S 0 =0, and Z=B when S 0 =1.

a. Fill-in the truth table for this two-to-one multiplexer below: Input Output S 0 A B Z

Copyright © Orly Alter 2008

Now, convert this truth table to a logic equation as follows: b. Write a logic expression for each row in the truth table, which has an output of 1 by combining the inputs with AND. Hint: The logic expression for the 3rd row is

S 0 • A• B = NOT(S 0 ) AND A AND NOT(B)

c. Then use OR to combine all of the row-specific expressions. What is the logic expression that describes the two-to-one multiplexer? Simplify it using Boolean algebra Hint:

A + A = A OR NOT(A) = 1

d. Explain in words the logic equation that you obtained, and why it describes the multiplexer. e. Complete below the Venn diagram of the multiplexer:

f. Use the logic equation derived in Question 1(c) to draw the schematics for the two-to-one multiplexer. Reminder: Below are the symbols of some common logic gates.

A B

S 0

Copyright © Orly Alter 2008

a. Write the truth table that corresponds to the two-to-four decoder, which is drawn above, using the headers below:

Input Output A 0 A 1 D 0 D 1 D 2 D 3

b. Complete below the Venn diagrams for D 0 , D 1 , D 2 and D 3. Do these overlap? What is their intersection?

D 0 D 1 D 2 D 3

The four-to-two encoder takes in the outputs of the two-to- four decoder and puts out the inputs of the decoder, thus reversing the decoder’s operation.

c. Fill-in the encoder’s truth table based on the decoder’s truth table of Question 2(a) using the following headers:

Encoder Input Encoder Output D 0 D 1 D 2 D 3 A 0 A 1

A 0

A 1

A 0

A 1

A 0

A 1

A 0

A 1

Copyright © Orly Alter 2008

d. Convert this truth table to logic equations for A 0 and A (^1) (20%). e. Use the logic equations derived in Question 2(d) to draw the schematics for the four-to-two encoder.

  1. Adder/Subtractor (140%): Build an adder/subtractor as follows: Modify the multiplexer of Question 1 so that when the selector is set at S 0 =0 it would add the two digits A and B and output the sum S and the carry C, whereas when the selector is set at S 0 =1 it would add the two’s complement of A with B and output the sum S and the carry C. Reminder: Two’s complement of a binary digit A is defined by the addition of the two binary digits

A = NOT(A)

and 1. Thus, for S 0 =0 the output would be the addition of the three digits S 0 =0, A and B, whereas for S 0 =1 the output would be the addition of the three digits S 0 =1,

A = NOT(A) and B.

a. Fill-in the truth table for this adder/subtractor below:

Input Output S 0 A B S C 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 1 1 1

Copyright © Orly Alter 2008

h. Simplify the logic equation for C using Boolean algebra. i. Complete below the Venn diagram for C.

j. Draw the schematics for the adder/subtractor, the logic structure that satisfies the above truth table (30%).

  1. Larger/Smaller-Of-Two (50% Extra Credit): The larger/smaller-of-two is a binary logic structure that takes as input two binary digits A and B for comparison, and a third binary digit S 0 for selection. For S 0 =0, the single binary digit output Z is the smaller of A and B, and for S 0 =1 the output is the larger of A and B. Modify the multiplexer of Question 1 to design this logic structure as follows: a. Write the truth table of the larger/smaller-of-two.

A B

S 0

Copyright © Orly Alter 2008

b. Convert this truth table to a logic equation for Z in terms of A, B and S 0. Simplify your logic equation as possible (20%). c. Draw the schematics or the larger/smaller-of-two following your logic equation for Z (20%).