### Miscelaneous features....

• Displaying the internal display labels of the connections/signals

• Fact:

 You can use the function key F5 to toggle the display of the signal labels

• Example: run the circuit simulation in the previous example

Press the function key F5 and you will see the following:

• Note:

 Yo do not want to display the signal labels because you will use many signals in your projects I tell you this because it will give you some idea on how the circuit simulation works....

• Grouping signals

• Grouping (existing) signals

• After defining the signals:

 ``` Sig(a, 10); // Signals: a[0], a[1], ........., a[9] Sig(b, 5); // Signals: b[0], b[1], ..., b[4] ```

you can group some of the signals together:

 ``` ( signal1, signal2, ..., signalN ) = a group of signals A group of signal "counts" as ONE single signal !! ```

This is just like Java:

 ``` { Statement1; Statement2; // "Counts" as ONE single statement !!! ... StatementN; } ```

• Example:

• The And-gate has the following syntax:

 ``` And( Coord, InputSignal, OutputSignal ); ```

The InputSignal consists of only one signal !!!

• To use an input of two signals to the And-gate, we group the input signals as follows:

 ``` And ( Coord, ( input1, input2 ), output ); ```

• Example Program: (Demo above code)

How to run the program:

 Right click on link and save in a scratch directory To compile:   cs355sim and To run:          ./simex

• Signal range notation

• Fact:

• Often, a group of signals is composed of signals from different sources

• When we compose a group of signals, we often use a sub-range of signals from different sources

 In logic-sim, there is a convenient way to denote sub-range of the signal array.

• Recall:

 ``` Sig( a, 10 ); // Define a range of signals: a[0] ... b[9] Sig( b, 5 ); // Define signals: b[0] .. b[4] ```

• We can compose a group of signals using a range notation x[i]-x[j] as follows:

 ``` (a[0]-a[3]) means: a[0], a[1], a[2], a[3] (4 signals !) (a[3]-a[0]) means: a[3], a[2], a[1], a[0] (4 signals !) (a[0],a[3]) means: a[0], a[3] (2 signals !) (a[3],a[0]) means: a[3], a[0] (2 signals !) ```

• I will show you an example of range-notation of signals later (in the next webpage) where we discuss how to use the Multiplexor component in the logic simulator