Subtractor Lab L03 - c-jump

y

z

Carry

Sum

0

0

0

0

0

0

0

1

0

1

0

1

0

0

1

0

1

1

1

0

1

0

0

0

1

1

0

1

1

0

1

1

0

1

0

1

1

1

1

1

Figure 3a: Full adder truth table

Figure 3b shows a possible gate-level realization of a full adder using AND, OR and XOR gates.

Figure 3b: Full adder gate-level circuit A full adder is a versatile circuit; for instance, it can be used to build multibit adders and/or subtractors. In this lab, you are first going to enter the circuit of Figure 3b in Digital Works and convert it into a black box with 3 inputs and 2 outputs, as shown in Figure 3c.

Figure 3c: Full adder block symbol The black box circuit is called a macro in Digital Works; it can be used as a building block in the construction of more complex circuits. The appendix of this lab handout contains a description of how to create/use a macro in Digital Works. For now, let's look at the overall problem that you

Submitting Results All macros are to be submitted with your assignment. Please make sure that each macro includes your name, datte and assignment number. Also that they are named correctly ie: LastnameF_L03x ( Where Lastname is your last name, F is your first initial and x is a unique letter [a-z] that you used to distinguish each macro.

Lab L03: Appendix

Creating a macro Once a design of a useful function is known, such as the full adder circuit of Figure 3d, Digital Works enables you to place it in a library for future use. Turning circuits into reusable black boxes is analogous to the use of subroutines in a high-level language.

Figure 3d: Full adder circuit Let's take the circuit of Figure 3d and convert it into a black box with 5 terminals: three inputs x, yand z, and two outputs sum and carry. The first step is to place macro tags at the circuit's inputs and outputs. A macro tag can be wired up to the rest of the circuit exactly like an input or output device. You left click on the macro tag icon to select it and then move the cursor to the place on the workspace you wish to insert the macro tag (that is, the input or output). Then you wire the macro tag to the appropriate input or output point of the circuit. Note that you can't apply a macro tag to the input or output of a gate directly --- you have to connect it to an input or output by a wire. See Figure 3e.

Figure 3e: Placing tags in the full adder circuit The next step is to create the black box itself. This is a slightly involved procedure. Place the cursor over one of the macro tags in the original circuit (that is, Figure 3e) and right click to pull down a menu. Select Template Editor from the menu with a left-click. A new window called Template Editor appears (Figure 3f). You create a black box representation of the circuit in this window. We have to use the simple polyline drawing tool provided by Digital Works create a suitable shape for the representation of the full adder. You just click on this tool in the Template Editor window and draw the shape by clicking in the workspace at the points you wish to draw a line. You exit the drawing mode by double clicking. You can also add text to the drawing by using the text tool. Figure 3f shows the shape we've drawn for the full adder and the label we have given it.

Figure 3f: Drawing a symbol for the full adder

The next step is to add pins to the black box in the Template Editor window and associate them with the macro tags in the original circuit. For each macro tag in the original circuit, you will need to insert a pin in the black box representation. To place a pin click on the pin icon in the Template Editor and then left-click in the workspace at the point you wish to locate this pin. Once you add all the pins use the text tool to add labels to the five pins (see Figure 3g). Close the Template Editor to bring you back to the circuit diagram.

Figure 3g: Adding pins and labels For each macro tag in the original circuit, repeat the following operations: •

Right-click the macro tag to enter the template editor.

In the template editor, select the corresponding pin. You then right click on this pin and select Associate with Tag to associate the pin with the macro tag in the circuit diagram.

Close the template editor.

Digital Works automatically numbers the tags in the circuit diagram as you associate them with pins. When you are finished assigning pins to macro tags, left-click the Tools command in the top line, then click Name Macro. Enter "1-bit full adder" into the text box and click OK. Finally, save your original circuit. This also saves its black box representation. Note that the template editor also has a save function; this save function does not save the circuit. You will need to save the circuit in a special folder called Macros, a subfolder of the Parts Centre folder. Enter LAB2_FA_XX (where XX are your initials) as the name of your file. (Note:if you do not have the permission to save in the above folder, check with the TA to where you should save the Macro.)

Using a macro The macro you have created for a 1-bit full adder and saved can be used like other circuit elements. Start a new circuit in Digital Works and begin with an empty work area. Click on the Part Centre icon in the bottom toolbar (Figure 3h). Select the appropriate macro from the pulldown menu that appears by left-clicking the embed macro icon and drag it wherever you want to place it in the workspace. If you saved your macro in a different drive/folder, make sure to click on the Change Drive button, shown in Figure 3h, to change the macros drive.

Figure 3h: Embedding a macro in a circuit

Subtractor Lab L03 - c-jump

Two's Complement Adder/Subtractor Lab L03 Introduction Computers are usually designed to perform indirect subtraction instead of direct subtraction. A...

Recommend Documents

Subtractor Subtractor Example: DIP-Switch Subtractor Example
Lecture 12 â Datapath Components. â« Subtractors. â« Two's Complement. â« Overflow. â« ALUs. â« Register Files. 2

Subtractor
Sep 23, 2009 - 1 Prelab. 1. Write the truth table for a full adder. 2. Write the truth table for a full subtractor. 3. S

Subtractor
Jan 31, 2013 - design an all-optical circuit that can perform full adder and subtractor operations. In this paper, we re

subtractor unit
approaches, the full Adder and Subtractors are realized in a single unit as compared to only full Subtractor in the exis

Full Subtractor Schematic - WordPress.com
Full Subtractor Schematic. Here's a full-adder circuit: The truth table for the above: INPUTS OUTPUTS A B CIN COUT S. 0

L03 Financial management in construction companies
Costs. â¢ Prices & Revenues. â¢ Profit. â¢ Break-even point. I. BASIC ECONOMIC CONCEPTS. Lecture 3: Financial managem

ECE 224 Lab #8 Preparation: 1. Draw the half subtractor circuit digram
Draw the half subtractor circuit digram. 2. Using half subtractors design a full subtractor circuit. 3. Design a circuit

Subtractor using a Novel Reversible - iarjset
full adder and a full subtractor by using one P2RG and Fredkin gate only. According to the control logic input the propo

subtractor circuits based on reversible gates - ijareeie
The reversible 4-bit full adder/ subtractor design unit is compared with conventional ripple carry adder, .... A four-bi

Subtractor using a Novel Reversible Gate
significant aspect of this work is that it can work both as a full adder and a full subtractor by using one P2RG and Fre