Question: You can design it by hand or by using an online tool. Half Adder Using the diagram for a half adder provided below, create a

You can design it by hand or by using an online tool.

Half Adder

Using the diagram for a half adder provided below, create a circuit (called HA), which will take two inputs (A and B) and will produce two outputs (S, the sum, and C, the carry).

You can design it by hand or by using an online tool.

Full Adder

Using two of your half adder components (described above), in a separate circuit (called FA) create a full adder component. The circuit will take three inputs (A, B, and C_in) and will produce two outputs (S, the sum, and C_out, the carry output). The circuit will use the following diagram for inspiration:

Half Adder Using the diagram for a half adder provided below, create

Adder/Subtractor

Using four of your full adder components (described above), in a separate circuit (called ADD_SUB) create a 4-bit adder/subtractor component. The circuit will take two sets of 4-bit inputs (A3-A0 and B3-B0), plus two additional inputs SUB (if true, SUBTRACT, otherwise ADD) and ENABLE (if true, all outputs are enabled using tri-state buffers, if false, all outputs are disabled). The circuit will produce a 4-bit sum (S3-S0) or difference (when subtracting).

The basic circuit is given below (without the ENABLE input). In this circuit, the K input is the same as our SUB input.

a circuit (called HA), which will take two inputs (A and B)

Comparator

For this part, you will modify your adder-subtractor circuit to also compare the two input numbers (A3-A0 and B3-B0). This is pretty easy since a subtractor circuit does most of the work. You will add three additional outputs (LT, GT, and EQ), where exactly one of them will be one (1). If the result is negative, then the LT output will be one (1). If the result is positive, then the GT output will be one (1). If the result is zero (0), then the EQ output will be one (1). You will just need to add these inputs and the logic to check the result of subtraction in order to complete this circuit.

A -S B B -C cin sum HA A Cout HA B A3 B2 A2 B1 A1 BO c2 c1 Full Adder Full Adder Full Adder Full Adder Cin Cout S3 S2 S1 SO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!