The editor for blog posts doesn't have a symbol that looks like the arrow for implication, so these are the symbols I will use here for the logical operators.
^ is AND
v is OR
~ is NOT
=> is IMPLIES
p = 1101
q = 1000
r = 0110
Find the bitstrings that correspond to these logical operations.
a) p v q
b) p ^ ~r
c) r => q
d) ~r => q
e) ~(r => q)
f) p v q ^ r
Answers in the comments.
More practice problems here .
Showing posts with label bitwise operators. Show all posts
Showing posts with label bitwise operators. Show all posts
Friday, February 25, 2011
Wednesday, July 15, 2009
practice for bitwise operators
p = 1001 1010
q = 0110 0110
r = 1011 0001
^ means and
v means or
~ means not
Order of operations: parentheses first, otherwise left to right
Find the following values.
a) p v q
b) p ^ r
c) p v ~q
d) ~p v q
e) r ^ ~q
f) ~(r ^ q)
Answers in the comments.
q = 0110 0110
r = 1011 0001
^ means and
v means or
~ means not
Order of operations: parentheses first, otherwise left to right
Find the following values.
a) p v q
b) p ^ r
c) p v ~q
d) ~p v q
e) r ^ ~q
f) ~(r ^ q)
Answers in the comments.
Subscribe to:
Posts (Atom)