Tuesday, May 13, 2008

Assignment #2

First four digits of student # is 2059
mod 8, 3 and 7 will be 3, 1 and 1 and for question #3 column 11

16 binary functions in the form of operations AND/OR and NOT
Let X = 0011 and Y = 0101

0000 = Y AND NOT Y
0001 = X AND Y
0010 = X AND NOT Y
0011 = X
0100 = Y AND NOT X
0101 = Y
0110 = (YNOTX) AND (XNOTY)
0111 = X OR Y / NOT X NAND NOT Y
1000 = NOT(NOT X NAND NOT Y)
1001 = X XNOR Y / NOT((X OR Y)AND(NOT(X AND Y))
1010 = NOT Y
1100 = NOT X
1011 = NOT X OR Y
1101 = X OR NOT Y
1110 = NOT(X AND Y)
1111 = X AND NOT X
According to DeMorgan's law we can can switch between AND and OR to describe all 16 combinations.

#2 { NOT, XOR}
The binary functions which can't be represented by using NOT and XOR operators
Binary functions which can be expressed by these two operations are
0110
1100
1010
1001
Thus only four binary combinations can be represented and rest 14 can't be done.

Q: #3 Associative column 11
From the table NOT Y = 1010
Associative Properties is
f(f(x,y),z) = f(x,f(y,z))

x = 00001111
y = 00110011
z = 01010101
f(x,y) = 11001100
f(f(x,y),z) = 00110011
f(y,z) = 10101010
f(x,f(y,z) = 00110011
thus it is associative.



#4
In trinary oprators where values are 0,1 and 2 i.e three valued logic. So three nullary operators, 9 unary,.. but if we put two input and one output then it is a case of binary operators which is equal to 3^(3)^2
outputs for trinary inputs. 3^3^2 = 19683
For more information go to http://en.wikipedia.org/wiki/Logical_operator

Q: #5

No comments: