- A Logic Circuit Simulation Library in C++
lcs::InputBus classes are provided with an overloaded operator '<<' which can be used to display the line states onto the std::stdout device. The usage is very similar to how one would use the '<<' operator for display of the standard data types.
lcs::Bus<3> bus; cout << bus;
The above code will print
xxx on the stdout device. Each
x denotes the
lcs::UNKNOWN state of the 3 lines of the bus. Similarly, the following code will print
101 on the stdout device.
lcs::Bus<3> bus(5); // The lines of the bus have been initialised to a binary equivalent of the decimal // integer 5. cout << bus;