Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NEED HELP WITH Logic Gates and circuits I have no idea how to do this if possible please provide an explanation as to how you

NEED HELP WITH Logic Gates and circuits I have no idea how to do this if possible please provide an explanation as to how you arrived at the conclusion

Task 1: 1-bit Full Adder

For this task, you will be creating a 1-bit Full Adder, which can be used to easily create an adder with an arbitrary number of bits.

  1. To begin, consider how you do binary addition on paper, but only look at what happens in a single bit. Ultimately, for each bit, you have 3 inputs, and 2 outputs. The inputs are A and B, the two bits you are adding, along with a potential Carry In (Cin, some sort of carry from the previous bit). The outputs are the sum for that bit, and a Carry Out (Cout) that goes onto the next bit. Observe the diagram above for clarification (Red = A, Light Blue = B, Green = Cin, Pink = Sum, Purple = Cout):

    1. For clarification in case the colors arent clear, the leftmost small boxed 1 is Cout, the small boxed 1 next to it is Cin, and in order going down from that 1 is A, B, then Sum. Again, starting from the leftmost small boxed 1, and following the path of boxed numbers is Cout, Cin, A, B, and Sum.

  2. Consider all of the possible permutations of A, B, and Cin being 0 and 1, and fill out what Sum and Cout would be in the table below

A

B

Cin

Sum

Cout

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

  1. Now that you have a table for the 1-bit Full Adder, you should be able to directly come up with the sum of product (SOP) equation for Sum and Cout (separately, in terms of A, B, and Cin).

  2. Use a K-map to minimize Cout (Sum would be requested to, but doesnt simplify, so just Cout).

  3. Create 3 inputs, A, B, and Cin, and create 2 outputs, Sum and Cout

  4. Implement a Full adder using any method you would like, but you cannot use the Adder component under components ----> arithmetic.

    1. Think a little about which method you want to use. You can either use the SOP from the truth table to make the schematic, or use the XOR you made in the previous lab.

    2. Note: If you make the schematic from SOP, because this table has 2 outputs, you essentially need to make two circuits in one. For doing Sum, ignore Cout and implement Sum in terms of A, B, and Cin. For doing Cout, ignore Sum and implement Cout in terms of A, B, and Cin (but remember to use a K-map to simplify Cout and make the schematic from the simplified form).

    3. To test your adder, you can also go to components ---> misc ---> test case. Put the test case in your file. Right click it, go to edit, and put in what the inputs and outputs would be. So, for example, this is how you could test the schematic for an AND gate: (make sure you put a double space between your last input and your output, in the case of this AND gate B and Q).

Once you put in the inputs and outputs, go to simulation run tests, and make sure everything passes. To test your adder, do this process for the adder truth table.

If everything passes, your output will be shown in green like this:

This is the test result for the AND schematic.

Task 2: Adder/Subtractor

For this task, you will be creating an Adder/Subtractor, which can toggle between which of the two operations it is doing. Essentially, take the adder that you made in task 1, confirm that it works and take screenshots as needed for submission purposes, and then add the subtraction functionality to it.

Consider the fact that you have an existing component which can do 4-bit addition, and suppose that you want to be able to do A - B for some numbers A and B. Using what youve learned about Twos Complement, you should know that this is the same as A + (-B) where -B is the result of inverting B, and adding 1. In order to invert B, you cant just use NOT gates, because you need to be able to turn on/off the inversion, since you want to be able to do addition and subtraction. In order to be able to toggle between inverting and noninverting, you want to have a component that works like the table below.

INV

A

Q

0

0

0

0

1

1

1

0

1

1

1

0

When INV is 0, then Q just outputs whatever A is, and when INV is 1, then Q outputs NOT A, which you should be able to see from the table. This table should be familiar to you however, as it is exactly the table for an XOR gate. As a result, if you pass in one of your B inputs as one of the inputs to an XOR gate, and use the other to control whether or not you are inverting, you can toggle whether you are adding or inverting.

In order to do the extra +1 for Twos complement, you can just set Cin to 1. Otherwise, it should just be 0 by default, because you dont want to carry anything into the adder when adding. Ultimately, your circuit should perform A + B when the SUB input is 0, and A + ~B + 1, with ~B being the inverse of B, and the +1 coming from Cin.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago