Introduction to Digital Works
The Digital Works Window
Creating and using Macros Converting the two-input multiplexer circuit into a black box
Creating the black box Left click on the arrow. Right click on one of the macro tags. Select Template Editor from the menu with a left click. The Template Editor window appears. You can create a symbol for your circuit. There may already be a default black box and if there is you can use it if you like, or you can delete it and draw one that you like.
Creating a symbol for the new circuit
Procedure for building the macro Once you have drawn an object or decided to use the default one you select the Pin Icon by left clicking. You then place the cursor where you want it to be in the diagram and left click to insert it. Next select it and right click and select associate with tag from the menu. Next close the template editor. You will notice a 1 next to the selected macro tag. Now select another macro tag, right click and select template editor and repeat the above procedure except for drawing the template. Do this for the remaining macro tags and then save the file. You do not use a separate name for the macro.
Creating an interface point in the black box
The completed black box representation
The original circuit with the macro tags numbered
Using a Macro Embedding a macro in a circuit
Using a Macro continued You can use the push button interactive tool to insert inputs to the macro and the LED tool to insert outputs to the macro. You then wire the interactive buttons and LEDs to the appropriate macro icons. You can then run and test it. Suppose you want to build a circuit having more than one macro (which may or may not be the same) Select the embed macro button and position the cursor to where you want it in the workspace and left click.
Embedding two macros, wiring them together
Editing a macro in a circuit
Editing the expanded form of the macro
Decimal Codes Decimal 8421 Excess-3 digit code code
Building a BCD adder Adding two single decimal digits given in 8421 BCD code can be accomplished by adding the 8421 representations as binary numbers. If there is no carry then the sum digit is exactly the binary sum and represents the 8421 representation of the two decimal digits. If there is a carry then this carry bit corresponds to 16 decimal and thus the correct two digit decimal number can be determined by subtracting 6 from the 5 th bit making it a 10 and adding the 6 into the first digit which is represented by the rightmost 4 digits. For example a sum of 18, given as = If we count the leading 1 as the tens digit then we must add to get = 18, i.e. 16 – 6 = 10 and = Now the = as a 8421 BCD 2 digit number.
Organization of a single-decade 8421 BCDdecimal adder.
Organization of a single-decade 8421 BCD adder.
Karnaugh map to detect the combinations P3P2P1P0 = 1010, 1011,..., P 3 P 2 + P 3 P 1 true implies one of the above combinations
A single-decade 8421 BCD adder.