- A Logic Circuit Simulation Library in C++ |
libLCS provides overloaded operators to facilitate an intuitive way to perform bitwise operations on bus line states. The result of such an operation can be assigned to another lcs::Bus
or lcs::BitBuff
object or its bit selects. An example is shown below.
lcs::Bus<5> b(21); // The bus lines have been initialised to a binary equivalent of the decimal // integer 21. lcs::BitBuff<> result; result = (b[0] & b[1]) ^ (b[2] | b[3]) & (b[4] ^ b[0]);