CIS 757                               757BOOLE                                   Prof. Auciello 
        Topics:      1. Symbolic Logic, AND, OR Operations,  Truth Tables
                        2. Javascript Programming -- (if.. else, boolean operators, testing)
                        3. Structured Programming (naming, format, etc)
                        4. Presentation Quality

Truth Table        AND                       OR  
 
A B A and B          

 

 

 

A B A OR B
1 1 1 1 1  1
1 0 0 1 0  0
0 1 0 0 1  0
 0 0 0  0 0 0

Try It!

              A         AND         B                      Result 

                                                     
                (Enter 0 or 1)

Assignment:   "Hack" this program, experiment.  Use it and understand it completely.
              100boole -- explain each statement in English.
Excellent Reference Page:  http://www.w3schools.com/js/js_obj_boolean.asp
Further work with Boolean:   http://www.quirksmode.org/js/boolean.html
  
Questions:  
Where is input value stored?
Note:  Outline of Program is:
HEAD
  SCRIPT
     get input 
     calculate.
     display result.
  /SCRIPT
/HEAD
BODY
  define input fields. 
  provide action to calculate result.
  define output field.
 /BODY

What connects the result field with the output box?

Further Activities:

1.  Implement OR  Operations

2.  Error-Trap (validate input) to allow only 0 or 1 to be entered.  (acknowledgement to Fernando Mendez , assisting with error-trapping).