CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Boolean algebra

  1. #1
    Join Date
    Sep 2005
    Posts
    24

    Boolean algebra

    hi, i was going through boolean algebra and i could not figure it out. let me know if you have any idea.

    F= A + BC + (DE+F)(A+BC)'

  2. #2
    Join Date
    Dec 2004
    Location
    Poland
    Posts
    1,165

    Re: Boolean algebra

    I have no idea about what I should have an idea .
    Please, state more clearly what you need, I know only that you have some problem with given logic equation.

    Cheers,
    Confused Hob
    B+!
    'There is no cat' - A. Einstein

    Use [code] [/code] tags!

    Did YOU share your photo with us at CG Members photo gallery ?

  3. #3
    Join Date
    Oct 2005
    Posts
    6

    Re: Boolean algebra

    F= A + BC + (DE+F)(A+BC)'
    Correct me if i'm wrong, but it looks like something is missing.

    the + sign is a logical OR, the single quote ( ' ) is logical NOT (bit inversion)

    i've only started learning about boolean algebra, so i'm not sure about the
    last part (DE+F)(A+BC)'

    it doesn't look right to me..but i don't know.

    you don't mention either what each letter equates, is it 1 or 0?

  4. #4
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: Boolean algebra

    hi, i was going through boolean algebra and i could not figure it out. let me know if you have any idea.
    Well, it's a lot like normal algebra except that you're working with 0's and 1's and you're limited to OR (+), and AND (* or nothing at all) and NOT (sometime written as ').

    Lets say that A = 0, B = 1 and C = 1, and F = A + B + C :
    Code:
    F = A + B + C
      = 0 + 1 + 1
      = 1    // Yes, normally this would be 2, but we're working with 0's and 1's
    Lets say that F = A + (B * C) :
    Code:
    F = A + (B * C)
      = 0 + (1 * 1)
      = 0 + 1
      = 1
    Or if F = A + (B * C)' :
    Code:
    F = A + (B * C)'
      = 0 + (1 * 1)'
      = 0 + (1)'
      = 0 + 0       // the (1)' was inverted and became 0
      = 0
    Another way of writing your expression:
    Code:
    F = A + BC + (DE+F)(A+BC)'
    
    // is the same as
    F = A + B * C + (D * E + F) * (A + B * C)'
    - petter

  5. #5
    Join Date
    Sep 2004
    Location
    Tehran(Ir)
    Posts
    469

    Re: Boolean algebra

    + means Or
    * means And

    0+0=0
    0+1=1
    1+0=1
    1+1=1

    0*0=0
    0*1=0
    1*0=0
    1*1=1
    F= A + BC + (DE+F)(A+BC)'
    (with this assumption A=1,B=0,C=0,D=1,E=0)
    F=1+ ... =1 (don't compute other parts because 1+everything=1)

  6. #6
    Join Date
    Dec 2004
    Location
    Poland
    Posts
    1,165

    Re: Boolean algebra

    OK, lets try to explain some things:
    1. In logic algebra, there is no such value as 0 and 1. There is only TRUE and FALSE. Of course, for convenience and somewhat better understanding, FALSE is replaced in notation by 0, and TRUE by 1.
    2. In logic algebra, there is no such operation like + and *. Those are arithemtic operations. In logic algebra you have logic sum (marked with operator which looks similar to letter u) and logic product (marked with operator which looks similar to letter u, turned upside down). For convenience, operation of logic sum and logic product are marked with arithemtic operatos, sum with + and product with * or nothing. Result of each operation is determined by its truth table, given by mehdi.
    3. Given two of above, saying that '1 + 1 gives 2, but since we are using only 0s and 1s it gives 1' is great simplification. You can use this logic, but only if you know why its correct and why it is not.
    4. When dealing with logic algebra, you need to remember some fundamental laws of it. Some of them are similar to arithmetic algebra, but some of them are NOT. Most important laws are:

    a OR true = true
    a AND false = false
    a AND a' = false
    a OR a' = true
    (a OR b) AND c = (a AND c) OR (a AND b) - similar to arithmetic
    (a AND b) OR c = (a OR b) AND (a OR c) - unlike arithmetic
    (a OR b)' = a' AND b' //de Morgan law I
    (a AND b)' = a' OR b' //de Morgan law II
    a OR b = a OR b OR a = a OR b OR b //duplication of terms does not change the result
    a AND b = a AND b AND a = a AND b AND b

    Given above, you can modify your equation to one of canonical forms:

    F= A + BC + (DE+F)(A+BC)'

    First, lets use deMorgan law to simplify this part:
    (A+BC)' = A' * (BC)' = A' * (B' + C') = A'B' + A'C'

    Now, the second part:
    (DE+F)(A+BC)' = (DE+F)(A'B' + A'C') = A'B'DE + A'B'F + A'C'DE + A'C'F

    And now, full equation is

    F= A + BC + (DE+F)(A+BC)' = A + BC + A'B'DE + A'B'F + A'C'DE + A'C'F

    Now, you could try to simplify this, but its whole another story.
    All of this seems to be complicated, but not always is neccessary. Everything depends of what you need to do with your equation. If something is still unclear, just post your questions here.

    Just one thing puzzling me, why is F term on both sides of this equation?

    I hope I did not make any error in these calculations

    Regards,
    Hob
    Last edited by Hobson; October 15th, 2005 at 05:29 PM.
    B+!
    'There is no cat' - A. Einstein

    Use [code] [/code] tags!

    Did YOU share your photo with us at CG Members photo gallery ?

  7. #7
    Join Date
    Sep 2004
    Location
    Tehran(Ir)
    Posts
    469

    Re: Boolean algebra

    Quote Originally Posted by Hobson
    Just one thing puzzling me, why is F term on both sides of this equation?
    well,it can be related to Sequentinal Circuits where meanwhile outputs depend on the current inputs they would depend on the state of the circuit too,that means those circuits have memory and internal state.

  8. #8
    Join Date
    Dec 2004
    Location
    Poland
    Posts
    1,165

    Re: Boolean algebra

    Quote Originally Posted by mehdi62b
    well,it can be related to Sequentinal Circuits where meanwhile outputs depend on the current inputs they would depend on the state of the circuit too,that means those circuits have memory and internal state.
    Ah yes, indeed, I did not think of that.

    Regards,
    Hob
    B+!
    'There is no cat' - A. Einstein

    Use [code] [/code] tags!

    Did YOU share your photo with us at CG Members photo gallery ?

  9. #9
    Join Date
    Sep 2005
    Posts
    24

    Re: Boolean algebra

    thanks Hobson, mehdi62b and all for helping me understand boolean algebra. sorry for misunderstanding the equation. original equation was "simplify: A + BC +(DE+F)(A+BC)' using boolean algebra" and i did not notice that i F was already in use.

    thanks again everyone for helping me.
    harry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured