Computer Programming                                                      Name -
Bit-String Flicking Worksheet #1

Use the bit-string flicking logical operations AND, OR, XOR, XNOR, and NOT to determine the results of the following expressions. Remember to follow the order of operations. If necessary, add leading 0's so that bit strings are of equivalent length before operating.

_____________________ 1. 1001 OR 11101

_____________________ 2. 10001 AND 11011 OR 11001

_____________________ 3. 11100 OR 10101 AND 10111

_____________________ 4. NOT 101 AND 100

_____________________ 5. 101011 XOR 110101

_____________________ 6. 101011 OR 100111 XOR 100010

_____________________ 7. NOT (11101 XNOR 10100)

_____________________ 8. 1011 OR 1101 XOR 1000 AND 1010 OR 1110 AND NOT 1000

list the solution(s) below 9. Assume that B is a bit string with 4 bits. If

1011 AND B = 1001

what are all of the possible bit strings that could be substituted for B? Realize that there could be more than one bit string that solves for B.

list the solution(s) below 10. Assume that C is a bit string with 5 bits. If

C OR 10101 AND 11110 = 11101

What are all of the possible bit strings that could be substituted for C?

list the solution(s) below 11. Assume that D is a bit string with 4 bits. If

NOT(1011 XOR D ) = 1010

What are all of the possible bit strings that could be substituted for D?

 

12. Make up a problem similar to #9-11 above where someone must solve for the missing bit-string. Be sure though that at least one possible solution exists. Sometimes these kinds of problems are unsolvable. For example no bit string E exists that solves the equation:                         E AND 00 = 11

Be sure to provide the solution(s) to your problem.