CSC103 Exercises on Binary System and Boolean Logic

From dftwiki3
Jump to: navigation, search

--D. Thiebaut 20:22, 31 January 2012 (EST)



Exercise 1: Logic Expressions

Assume that we have several boolean expressions, labeled E1 to E6:

  • E1: is a Smith student
  • E2: is a senior
  • E3: likes vanilla
  • E4: has class on Monday
  • E5: takes classes at Hampshire College
  • E6: is on the crew team

What is the boolean expression that is a combination of E1, E2, E3, E4, and/or E5, and the logic operators AND, OR, and NOT, that will be True whenever I find somebody on campus who's a 5-college student who goes to class only on Tuesdays and Thursdays?

Hints: see if you can discard any of the boolean expressions, and write the truth table for the wanted expression.

Exercise 2: Logic

What is the truth table for the expression E9 = ( E7 or E6 ) and ( not E8 )

Exercise 3: Binary System

  • In binary, what are the numbers that logically follow these numbers:
    • 00000000000111
    • 11011
    • 0000111
    • 112

Exercise 4: Binary Additions

  • Perform the following additions of binary numbers by hand=
     111111
   +      1
        


     110011
   + 110011


Exercise 5: Base 3

  • Assume that you have system with only three digits: 0, 1, and 2.
  • Count in base 3, and list the first 15 numbers of the series, starting with 0.
  • What is the numbers that logically follow the numbers base 3 listed below?
    • 101
    • 102
    • 112
    • 222

Exercise 6: Adding in Base 3

  • Perform the following additions in Base 3:


      111222
   +       1


      120112
   +  122110