/***************************** logic *****************************/ include "LIBRARY/logic.lib"; define base = 2, n = 8; path value1[ n ], value2[ n ], resultOr[ n ], resultAnd[ n ], resultXor[ n ], resultNor[ n ], resultNand[ n ], resultNxor[ n ], resultNot[ n ], resultJoin[ n ]; input( "value1", 10, 50, base, n ) { out value1 }; input( "value2", 10, 100, base, n ) { out value2 }; { in value1, value2 } orBits( n ) { out resultOr }; { in value1, value2 } andBits( n ) { out resultAnd }; { in value1, value2 } xorBits( n ) { out resultXor }; { in value1, value2 } norBits( n ) { out resultNor }; { in value1, value2 } nandBits( n ) { out resultNand }; { in value1, value2 } nxorBits( n ) { out resultNxor }; { in value1 } not( n ) { out resultNot }; { in value1 } join( n ) { out resultJoin }; { in resultOr } output( "resultOr", 10, 150, base, n ); { in resultAnd } output( "resultAnd", 10, 200, base, n ); { in resultXor } output( "resultXor", 10, 250, base, n ); { in resultNor } output( "resultNor", 10, 300, base, n ); { in resultNand } output( "resultNand", 10, 350, base, n ); { in resultNxor } output( "resultNxor", 10, 400, base, n ); { in resultNot } output( "resultNot", 10, 450, base, n ); { in resultJoin } output( "resultJoin", 10, 500, base, n );