Drawing a Logic Switching Diagram

From Apache OpenOffice Wiki
< Documentation‎ | OOoAuthors User Manual‎ | Draw Guide
Revision as of 08:30, 12 April 2008 by Jeanweber (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The use of the symbol library which you have created and placed in the Gallery can be illustrated by using the blocks to draw a half adder (see http://en.wikipedia.org/wiki/Half_adder#Half_adder). You can precisely place all the drawing objects with the help of Draw’s snap functions. The following instructions are only one way to achieve this objective!

Figure 8: Half adder drawn using logic symbol building blocks

Begin with a new drawing. Set the unit of measurement to centimeter, a grid point spacing of 0.5 cm and subdivision of 4 points. Activate the grid, guiding lines, and associated snap functions.

In the first part of the exercise you should draw only the two signal leads a and b, the two INVERTER gates and the two AND gates.

Begin by drawing the two signal leads. To make it a bit easier, you can use the values in the following table.

Start point Length
Signal wire a X = 2 cm / Y = 3.0 cm 5.5 cm
Signal wire b X = 3 cm / Y = 3.0 cm 5.5 cm

After drawing the two signal leads, you begin the hardest part. With grouped objects the snap function works only on points on the outside contours. The only way to work with these blocks as a unit, however, is as a grouped object. The input and output leads must lie right on grid points if the connecting lines are to be exactly horizontal or vertical.

Position two horizontal guiding lines (A, B) on the grid with Y=4.0 cm and Y=6.0 cm. With Snap to grid active, this should be no problem. With an INVERTER gate the input and output leads lie in the middle of the block, 4 mm below the upper edge. In order that the input and output are docked to the guiding line, the upper edges of the INVERTER gate must be positioned (for a 5 mm grid spacing) at Y=4.1 cm and Y=6.1 cm. Right-click on the guiding line, select Edit guiding line from the context menu and set the guiding lines to 4.1 cm and 6.1 cm.

In order that the blocks lie exactly underneath each other, insert vertical guiding lines at X=5.0 cm (INVERTER gate) and X=8.0 cm (AND gate).

Now open the Gallery and drag the Inverter gate into approximately the position desired. If the function Snap to guiding line is still active, you will be able to accurately position both blocks in the correct location. Your diagram should now look like Figure 9 and you can save it.

Figure 9: Drawing a half adder - Step 1

The input and output leads of the INVERTER lie at Y=4.5 cm and Y=6.5 cm. Move the mouse over a guiding line. When the mouse cursor changes to a double arrow, drag the guiding line (with the left mouse button pressed) onto the input and output leads of the block. If the grid snap is still active, this should be exactly positioned without much effort.

The leads of the AND gate lie 1.5 mm below the upper edges of the two horizontal guiding lines. They must be moved up for the next step. The Y coordinates are reduced to 4.35 cm and 6.35 cm (the top edges of the AND gates). When you have moved the lines, you can drag both AND gates from the Gallery and position them. Your drawing should now resemble that in Figure 10.

Next drag the horizontal guiding lines again over the input and output of the gates (Y=4.5/6.5 cm), so that when you position the connection point of the leads (a small black circle) it will sit exactly on top of the leads from the gates.

Figure 10: Drawing a half adder - Step 2

To position the two last gates, you need to set the following additional guiding lines: a vertical line with X=11 cm and two horizontal lines (C,D) at Y=5.5 cm and Y=7.5 cm respectively. Shift the horizontal lines C and D each 1.5mm upwards (so that Y=5.35 cm and Y=7.35 cm).

Drag the OR and the last AND gate from the gallery and position them as in Figure 11.

Figure 11: Drawing a half adder - Step 3

Since the OR gate will be connected to the two previously positioned AND gates, you can delete the guiding line of the OR gate. Drag the horizontal guiding line C and D over the inputs of the AND gates (Y=7.0 and 7.5 cm) and put two other lines (E,F) on the remaining connections (Y=5.0 and 8.0 cm) as shown in Figure 12.

Deactivate all snap functions except snap to grid. It is a good idea to zoom in so that you can place the lead connections exactly over the intersection points. Drag the connections singly from the Gallery to where you want to position them. You will need to adjust their position with the mouse. The easiest way is to move the connection diagonally to the desired location (see Figure 13).

The guiding lines are no longer needed and can be hidden (it is better to wait until you have finished the drawing before you delete them). Your drawing should now start to look like Figure 12 and can be again saved.

Figure 12: Drawing a half adder - Step 4

The individual blocks must now be joined up so that the gates function as a half adder system. To do this, you use connectors. Open the Connector toolbar. Use the standard connector [[Image:]] to join the OR to the two AND gates. All the other leads run horizontally and you can use the direct connector [[Image:]].

When all six lead connections have been positioned, both signal wires should have a small black circle added to their connection points. You can use the symbol for NOT from the Gallery as the basis for this.

Figure 13: Setting the connections

If you have correctly positioned the symbols in the drawing, all the connection leads will be straight lines. At this time you can delete all the guiding lines, add text to the drawing and your finished drawing should resemble Figure 12 above.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools