Skip to main content
ICT
A14 - Boolean Algebra and Loop Boundaries
 
Main Previous Next
Title Page >  
Summary >  
Lesson A1 >  
Lesson A2 >  
Lesson A3 >  
Lesson A4 >  
Lesson A5 >  
Lesson A6 >  
Lesson A7 >  
Lesson A8 >  
Lesson A9 >  
Lesson A10 >  
Lesson A11 >  
Lesson A12 >  
Lesson A13 >  
Lesson A14 >  
Lesson A15 >  
Lesson A16 >  
Lesson A17 >  
Lesson A18 >  
Lesson A19 >  
Lesson A20 >  
Lesson A21 >  
Lesson A22 >  
Lesson AB23 >  
Lesson AB24 >  
Lesson AB25 >  
Lesson AB26 >  
Lesson AB27 >  
Lesson AB28 >  
Lesson AB29 >  
Lesson AB30 >  
Lesson AB31 >  
Lesson AB32 >  
Lesson AB33 >  
Vocabulary >  
 

B. Boolean Algebra and DeMorgan’s Laws page 4 of 7

  1. Boolean Algebra is a branch of mathematics devoted to the study of Boolean values and operators. Boolean Algebra consists of these fundamental operands and operators:

    operands (values): true, false

    operators: and (&&), or (||), not (!)

    (Note: Java has other Boolean operators, such as ^ (XOR - “exclusive or”) and equivalence. This curriculum does not cover these other operators because they are not part of the AP subset.)

  2. There are many identities that have been developed to use with compound Boolean expressions. Two of the more useful identities are DeMorgan's Laws, which are used to negate compound Boolean expressions.

    DeMorgan’s Laws:

    !(A || B) -> ! A && ! B

    !(A && B) -> ! A || ! B

    The symbols A and B represent the Boolean values, true or false.

  3. Here is the truth table that proves the first DeMorgan’s Law.

A
B
 
!(A||B)
!A
!B
!A&&!B
 
true
true
false
false
false
false
true
false
false
false
true
false
false
true
false
true
false
false
false
false
true
true
true
true

Notice that columns with the titles ! (A || B) and ! A && ! B result in the same answers.

  1. Following is the truth table that proves the second DeMorgan's Law.

    A
    B
     
    !(A&&B)
    !A
    !B
    !A||!B
     
    true
    true
    false
    false
    false
    false
    true
    false
    true
    false
    true
    true
    false
    true
    true
    true
    false
    true
    false
    false
    true
    true
    true
    true

    Notice that columns with the titles ! (A && B) and ! A || ! B result in the same answers.

  2. Here is a good way to think about both of DeMorgan’s Laws. Notice that it is similar to the distributive postulate in mathematics. The not operator is distributed through both terms inside of the parentheses, except that the operator switches from and to or, or vice versa.

    !(A && B) -> ! A || ! B

    !(A || B) -> ! A && ! B

 

Main Previous Next
Contact
 © ICT 2006, All Rights Reserved.